#include <stdio.h>#include <ostream>Go to the source code of this file.
Compounds | |
| class | MessageId |
| class | MessageTracer |
Defines | |
| #define | EV ev.disable_tracing?ev:ev |
| #define | MAX_LINE 100 |
Functions | |
| char * | fgetline (FILE *fp) |
| std::ostream & | operator<< (std::ostream &out, const MessageId &m) |
|
|
|
Definition at line 36 of file utils.h. Referenced by fgetline(). |
|
|
Definition at line 23 of file utils.cc. References MAX_LINE. Referenced by MACRelayUnitBase::readAddressTable().
00024 {
00025 // alloc buffer and read a line
00026 char *line = new char[MAX_LINE];
00027 if (fgets(line,MAX_LINE,fp)==NULL)
00028 return NULL;
00029
00030 // chop CR/LF
00031 line[MAX_LINE-1] = '\0';
00032 int len = strlen(line);
00033 while (len>0 && (line[len-1]=='\n' || line[len-1]=='\r'))
00034 line[--len]='\0';
00035
00036 return line;
00037 }
|
|
||||||||||||
|
Definition at line 87 of file utils.h. References MessageId::id, MessageId::parentId, and MessageId::treeId.
|
1.2.17