From f8bf0e77863f4698fda8f96b0872d32d4939f233 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 27 Jul 2002 02:14:20 +0000 Subject: [PATCH] Moved userdat.c:getrec/putrec routines into dat_rec.c. --- src/sbbs3/addfiles.dsp | 10 +++++----- src/sbbs3/objects.mk | 1 + src/sbbs3/sbbs.dsp | 4 ++++ src/sbbs3/sbbsecho.dsp | 4 ++++ src/sbbs3/userdat.c | 34 ---------------------------------- src/sbbs3/userdat.h | 3 +-- 6 files changed, 15 insertions(+), 41 deletions(-) diff --git a/src/sbbs3/addfiles.dsp b/src/sbbs3/addfiles.dsp index f077604f4c..1a569174f6 100644 --- a/src/sbbs3/addfiles.dsp +++ b/src/sbbs3/addfiles.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "msvc.win32.exe.release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\xpdev" /D "NDEBUG" /D "WRAPPER_IMPORTS" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WRAPPER_EXPORTS" /D "SBBS_EXPORTS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\xpdev" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WRAPPER_EXPORTS" /D "SBBS_EXPORTS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -90,6 +90,10 @@ SOURCE=.\ars.c # End Source File # Begin Source File +SOURCE=.\dat_rec.c +# End Source File +# Begin Source File + SOURCE=.\date_str.c # End Source File # Begin Source File @@ -128,9 +132,5 @@ SOURCE=.\scfglib2.c SOURCE=.\str_util.c # End Source File -# Begin Source File - -SOURCE=.\userdat.c -# End Source File # End Target # End Project diff --git a/src/sbbs3/objects.mk b/src/sbbs3/objects.mk index e093521a94..2cccc64800 100644 --- a/src/sbbs3/objects.mk +++ b/src/sbbs3/objects.mk @@ -17,6 +17,7 @@ OBJS = $(LIBODIR)$(SLASH)ansiterm.$(OFILE)\ $(LIBODIR)$(SLASH)con_hi.$(OFILE)\ $(LIBODIR)$(SLASH)con_out.$(OFILE)\ $(LIBODIR)$(SLASH)crc32.$(OFILE)\ + $(LIBODIR)$(SLASH)dat_rec.$(OFILE)\ $(LIBODIR)$(SLASH)data.$(OFILE)\ $(LIBODIR)$(SLASH)data_ovl.$(OFILE)\ $(LIBODIR)$(SLASH)date_str.$(OFILE)\ diff --git a/src/sbbs3/sbbs.dsp b/src/sbbs3/sbbs.dsp index 48553e7fcb..bed3bc60f4 100644 --- a/src/sbbs3/sbbs.dsp +++ b/src/sbbs3/sbbs.dsp @@ -134,6 +134,10 @@ SOURCE=.\crc32.c # End Source File # Begin Source File +SOURCE=.\dat_rec.c +# End Source File +# Begin Source File + SOURCE=.\data.cpp # End Source File # Begin Source File diff --git a/src/sbbs3/sbbsecho.dsp b/src/sbbs3/sbbsecho.dsp index 808b90eb0b..e75a79c1f5 100644 --- a/src/sbbs3/sbbsecho.dsp +++ b/src/sbbs3/sbbsecho.dsp @@ -92,6 +92,10 @@ SOURCE=.\crc32.c # End Source File # Begin Source File +SOURCE=.\dat_rec.c +# End Source File +# Begin Source File + SOURCE=.\date_str.c # End Source File # Begin Source File diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index a062bc5217..6ec15eb633 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -44,7 +44,6 @@ char* nulstr=""; #define REPLACE_CHARS(str,ch1,ch2) for(c=0;str[c];c++) if(str[c]==ch1) str[c]=ch2; - /****************************************************************************/ /* Looks for a perfect match amoung all usernames (not deleted users) */ /* Makes dots and underscores synomynous with spaces for comparisions */ @@ -559,39 +558,6 @@ int DLLCALL putusername(scfg_t* cfg, int number, char *name) return(0); } -/****************************************************************************/ -/* Places into 'strout' CR or ETX terminated string starting at */ -/* 'start' and ending at 'start'+'length' or terminator from 'strin' */ -/****************************************************************************/ -void DLLCALL getrec(char *strin,int start,int length,char *strout) -{ - int i=0,stop; - - stop=start+length; - while(start<stop) { - if(strin[start]==ETX || strin[start]==CR || strin[start]==LF) - break; - strout[i++]=strin[start++]; - } - strout[i]=0; -} - -/****************************************************************************/ -/* Places into 'strout', 'strin' starting at 'start' and ending at */ -/* 'start'+'length' */ -/****************************************************************************/ -void DLLCALL putrec(char *strout,int start,int length,char *strin) -{ - int i=0,j; - - j=strlen(strin); - while(i<j && i<length) - strout[start++]=strin[i++]; - while(i++<length) - strout[start++]=ETX; -} - - /****************************************************************************/ /* Returns the age derived from the string 'birth' in the format MM/DD/YY */ /* Called from functions statusline, main_sec, xfer_sec, useredit and */ diff --git a/src/sbbs3/userdat.h b/src/sbbs3/userdat.h index ef1bcc9809..b538874a1b 100644 --- a/src/sbbs3/userdat.h +++ b/src/sbbs3/userdat.h @@ -39,6 +39,7 @@ #define _USERDAT_H #include "scfgdefs.h" /* scfg_t */ +#include "dat_rec.h" /* getrec/putrec prototypes */ #ifdef DLLEXPORT #undef DLLEXPORT @@ -72,8 +73,6 @@ extern char* nulstr; DLLEXPORT int DLLCALL getuserdat(scfg_t* cfg, user_t* user); /* Fill userdat struct with user data */ DLLEXPORT int DLLCALL putuserdat(scfg_t* cfg, user_t* user); /* Put userdat struct into user file */ -DLLEXPORT void DLLCALL getrec(char *instr,int start,int length,char *outstr); /* Retrieve a record from a string */ -DLLEXPORT void DLLCALL putrec(char *outstr,int start,int length,char *instr); /* Place a record into a string */ DLLEXPORT uint DLLCALL matchuser(scfg_t* cfg, char *str, BOOL sysop_alias); /* Checks for a username match */ DLLEXPORT char* DLLCALL alias(scfg_t* cfg, char* name, char* buf); DLLEXPORT int DLLCALL putusername(scfg_t* cfg, int number, char * name); -- GitLab