|
|
1.1 ! root 1: /* userdat.h */ ! 2: ! 3: /* Synchronet user data access routines (exported) */ ! 4: ! 5: /* $Id: userdat.h,v 1.4 2000/11/12 16:01:37 rswindell Exp $ */ ! 6: ! 7: /**************************************************************************** ! 8: * @format.tab-size 4 (Plain Text/Source Code File Header) * ! 9: * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * ! 10: * * ! 11: * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * ! 12: * * ! 13: * This program is free software; you can redistribute it and/or * ! 14: * modify it under the terms of the GNU General Public License * ! 15: * as published by the Free Software Foundation; either version 2 * ! 16: * of the License, or (at your option) any later version. * ! 17: * See the GNU General Public License for more details: gpl.txt or * ! 18: * http://www.fsf.org/copyleft/gpl.html * ! 19: * * ! 20: * Anonymous FTP access to the most recent released source is available at * ! 21: * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * ! 22: * * ! 23: * Anonymous CVS access to the development source and modification history * ! 24: * is available at cvs.synchro.net:/cvsroot/sbbs, example: * ! 25: * cvs -d :pserver:[email protected]:/cvsroot/sbbs login * ! 26: * (just hit return, no password is necessary) * ! 27: * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src * ! 28: * * ! 29: * For Synchronet coding style and modification guidelines, see * ! 30: * http://www.synchro.net/source.html * ! 31: * * ! 32: * You are encouraged to submit any modifications (preferably in Unix diff * ! 33: * format) via e-mail to [email protected] * ! 34: * * ! 35: * Note: If this box doesn't appear square, then you need to fix your tabs. * ! 36: ****************************************************************************/ ! 37: ! 38: #ifndef _USERDAT_H ! 39: #define _USERDAT_H ! 40: ! 41: #include "scfgdefs.h" /* scfg_t */ ! 42: ! 43: #ifdef DLLEXPORT ! 44: #undef DLLEXPORT ! 45: #endif ! 46: #ifdef DLLCALL ! 47: #undef DLLCALL ! 48: #endif ! 49: ! 50: #ifdef _WIN32 ! 51: #ifdef SBBS_EXPORTS ! 52: #define DLLEXPORT __declspec(dllexport) ! 53: #else ! 54: #define DLLEXPORT __declspec(dllimport) ! 55: #endif ! 56: #ifdef __BORLANDC__ ! 57: #define DLLCALL __stdcall ! 58: #else ! 59: #define DLLCALL ! 60: #endif ! 61: #else ! 62: #define DLLEXPORT ! 63: #define DLLCALL ! 64: #endif ! 65: ! 66: #ifdef __cplusplus ! 67: extern "C" { ! 68: #endif ! 69: ! 70: extern char* crlf; ! 71: extern char* nulstr; ! 72: ! 73: DLLEXPORT int DLLCALL getuserdat(scfg_t* cfg, user_t* user); /* Fill userdat struct with user data */ ! 74: DLLEXPORT int DLLCALL putuserdat(scfg_t* cfg, user_t* user); /* Put userdat struct into user file */ ! 75: DLLEXPORT void DLLCALL getrec(char *instr,int start,int length,char *outstr); /* Retrieve a record from a string */ ! 76: DLLEXPORT void DLLCALL putrec(char *outstr,int start,int length,char *instr); /* Place a record into a string */ ! 77: DLLEXPORT uint DLLCALL matchuser(scfg_t* cfg, char *str); /* Checks for a username match */ ! 78: DLLEXPORT uint DLLCALL lastuser(scfg_t* cfg); ! 79: DLLEXPORT char DLLCALL getage(scfg_t* cfg, char *birthdate); ! 80: DLLEXPORT char* DLLCALL username(scfg_t* cfg, int usernumber, char * str); ! 81: DLLEXPORT int DLLCALL getnodedat(scfg_t* cfg, uint number, node_t *node, char lockit); ! 82: DLLEXPORT int DLLCALL putnodedat(scfg_t* cfg, uint number, node_t *node); ! 83: DLLEXPORT uint DLLCALL userdatdupe(scfg_t* cfg, uint usernumber, uint offset, uint datlen, char *dat ! 84: ,BOOL del); ! 85: ! 86: DLLEXPORT BOOL DLLCALL chk_ar(scfg_t* cfg, uchar* str, user_t* user); /* checks access requirements */ ! 87: ! 88: DLLEXPORT int DLLCALL getuserrec(scfg_t*, int usernumber, int start, int length, char *str); ! 89: DLLEXPORT int DLLCALL putuserrec(scfg_t*, int usernumber, int start, uint length, char *str); ! 90: DLLEXPORT ulong DLLCALL adjustuserrec(scfg_t*, int usernumber, int start, int length, long adj); ! 91: DLLEXPORT void DLLCALL subtract_cdt(scfg_t*, user_t*, long amt); ! 92: ! 93: #ifdef __cplusplus ! 94: } ! 95: #endif ! 96: ! 97: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.