init ems server code

This commit is contained in:
2024-09-27 15:39:34 +08:00
parent 9d4009aaca
commit 9930e4e58f
1551 changed files with 110216 additions and 102864 deletions

View File

@@ -0,0 +1,44 @@
//////////////////////////////////////////////////
//Title : wxc_file.c
//Auhtor : Liu Wei
//Desc : wxc file handle inplementation
//Created : 2007-06-04
//Revision :
//
//Revision :
//
//////////////////////////////////////////////////
#include "./include/pub_file.h"
/*@ignore@*/
///////////////////////////////////////////////////////////////////////////
// GetOneLine: Read one line of a file
///////////////////////////////////////////////////////////////////////////
extern char *GetOneLine ( char *pFileName )
{
FILE *pFile;
static char sBuff[1024];
char *pCh;
pFile = fopen ( pFileName, "r" );
if ( pFile != NULL )
{
if ( fgets ( sBuff, sizeof ( sBuff ), pFile ) != NULL )
{
if ( NULL != (pCh = strchr ( sBuff, '\n' )) )
{
*pCh = CNULL;
}
return sBuff;
}
( void ) fclose ( pFile );
}
return ( char * ) NULL;
}
/*@end@*/