Skip to content
Snippets Groups Projects
Commit f8bf0e77 authored by rswindell's avatar rswindell
Browse files

Moved userdat.c:getrec/putrec routines into dat_rec.c.

parent 95e01c31
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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)\
......
......@@ -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
......
......@@ -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
......
......@@ -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 */
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment