#include <stdio.h>
#include "INETDefs.h"
Defines | |
| #define | MAX_LINE 100 |
Functions | |
| char * | fgetline (FILE *fp) |
| std::ostream & | operator<< (std::ostream &out, const MessageId &m) |
|
|
|
|
|
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 }
|
|
||||||||||||
|
00078 {
00079 out << "Id:" << m.id << " TreeId: " << m.treeId << " ParentId:" << m.parentId; return out;
00080 }
|
1.4.1