diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index 5ed42f3a148f300a817e76eb6c3a248efad9c581..ee7e8d941c9c0d9637e593482f40b3a3c44ba71a 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -625,9 +625,9 @@ int DLLCALL putusername(scfg_t* cfg, int number, char *name) /****************************************************************************/ /* Returns the age derived from the string 'birth' in the format MM/DD/YY */ /****************************************************************************/ -char DLLCALL getage(scfg_t* cfg, char *birth) +uint DLLCALL getage(scfg_t* cfg, char *birth) { - char age; + uint age; struct tm tm; time_t now; @@ -642,7 +642,7 @@ char DLLCALL getage(scfg_t* cfg, char *birth) return(0); age=(tm.tm_year)-(((birth[6]&0xf)*10)+(birth[7]&0xf)); if(age>105) - age-=105; + age-=100; tm.tm_mon++; /* convert to 1 based */ if(cfg->sys_misc&SM_EURODATE) { /* DD/MM/YY format */ if(atoi(birth)>31 || atoi(birth+3)>12) diff --git a/src/sbbs3/userdat.h b/src/sbbs3/userdat.h index 7058fb15189b9c1436869ed5eea8eb5a903251e7..f8e733863138c74fbc71c9747b9ed2cfcdf01ac7 100644 --- a/src/sbbs3/userdat.h +++ b/src/sbbs3/userdat.h @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -80,7 +80,7 @@ DLLEXPORT int DLLCALL putusername(scfg_t* cfg, int number, char * name); DLLEXPORT uint DLLCALL total_users(scfg_t* cfg); DLLEXPORT uint DLLCALL lastuser(scfg_t* cfg); DLLEXPORT BOOL DLLCALL del_lastuser(scfg_t* cfg); -DLLEXPORT char DLLCALL getage(scfg_t* cfg, char *birthdate); +DLLEXPORT uint DLLCALL getage(scfg_t* cfg, char *birthdate); DLLEXPORT char* DLLCALL username(scfg_t* cfg, int usernumber, char * str); DLLEXPORT char* DLLCALL usermailaddr(scfg_t* cfg, char* addr, char* name); DLLEXPORT int DLLCALL getnodedat(scfg_t* cfg, uint number, node_t *node, int* file);