Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

inetnull.cc File Reference

#include "rcs_defs.hh"
#include "inetfile.hh"
#include <stdio.h>

Include dependency graph for inetnull.cc:

Include dependency graph

Go to the source code of this file.

Data Structures

class  INET_FILE

Functions

int inet_file_init (const char *agent_name, char *agent_version, int debug)
INET_FILEinet_file_open (const char *url, char *type)
char * inet_file_gets (char *str, int maxlen, INET_FILE *inet_file)
int inet_file_close (INET_FILE *inet_file)
int inet_file_eof (INET_FILE *inet_file)
int inet_file_exit ()
RCS_EXPORT int inet_file_rewind (INET_FILE *ifp)


Function Documentation

int inet_file_init const char *    agent_name,
char *    agent_version,
int    debug
 

Definition at line 25 of file inetnull.cc.

00026 {
00027   return 0;
00028 }

INET_FILE* inet_file_open const char *    url,
char *    type
 

Definition at line 32 of file inetnull.cc.

Referenced by find_proc_and_buffer_lines(), get_buffer_line(), load_nml_config_file(), and CMS_SERVER::read_passwd_file().

00033 {
00034 
00035   FILE *fp = NULL;
00036   INET_FILE *inet_file = NULL;
00037 
00038   fp = fopen (url, type);
00039   if (NULL == fp)
00040     {
00041       return NULL;
00042     }
00043   inet_file = new INET_FILE;
00044   if (NULL != inet_file)
00045     {
00046       inet_file->fp = fp;
00047     }
00048   return inet_file;
00049 }

char* inet_file_gets char *    str,
int    maxlen,
INET_FILE   inet_file
 

Definition at line 54 of file inetnull.cc.

Referenced by findSection(), find_proc_and_buffer_lines(), get_buffer_line(), iniFind(), iniSection(), load_nml_config_file(), and CMS_SERVER::read_passwd_file().

00055 {
00056   if (NULL == inet_file)
00057     {
00058       return NULL;
00059     }
00060   return fgets (str, maxlen, inet_file->fp);
00061 }

int inet_file_close INET_FILE   inet_file
 

Definition at line 65 of file inetnull.cc.

Referenced by find_proc_and_buffer_lines(), and load_nml_config_file().

00066 {
00067   if (NULL != inet_file)
00068     {
00069       fclose (inet_file->fp);
00070       delete inet_file;
00071     }
00072   return 0;
00073 }

int inet_file_eof INET_FILE   inet_file
 

Definition at line 76 of file inetnull.cc.

Referenced by findSection(), find_proc_and_buffer_lines(), get_buffer_line(), iniFind(), load_nml_config_file(), and CMS_SERVER::read_passwd_file().

00077 {
00078   if (NULL == inet_file)
00079     {
00080       return 1;
00081     }
00082   return feof (inet_file->fp);
00083 }

int inet_file_exit  
 

Definition at line 87 of file inetnull.cc.

00088 {
00089   return 0;
00090 }

RCS_EXPORT int inet_file_rewind INET_FILE   ifp
 

Definition at line 94 of file inetnull.cc.

Referenced by findSection(), and iniFind().

00095 {
00096   if (NULL == ifp)
00097     {
00098       return -1;
00099     }
00100   if (ifp->fp != NULL)
00101     {
00102       rewind (ifp->fp);
00103       return 0;
00104     }
00105 }


Generated on Sun Dec 2 15:57:09 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001