#include <stdio.h>
#include "INETDefs.h"
Classes | |
| class | MessageTracer |
| class | MessageId |
Defines | |
| #define | MAX_LINE 100 |
Functions | |
| char * | fgetline (FILE *fp) |
| std::ostream & | operator<< (std::ostream &out, const MessageId &m) |
| #define MAX_LINE 100 |
| char* fgetline | ( | FILE * | fp | ) |
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 }
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const MessageId & | m | |||
| ) | [inline] |
1.4.7