From 7b2cc2e83030882b319bbf87932c7727c174adc7 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 30 Aug 2009 07:33:13 +0000 Subject: * (pwcu branch) const cuser code complete git-svn-id: http://opensvn.csie.org/pttbbs/branches/pttbbs.pwcu@4795 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/proto.h | 14 +++++++++++++- include/pttstruct.h | 5 +++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/proto.h b/include/proto.h index b01e8712..e0f784c0 100644 --- a/include/proto.h +++ b/include/proto.h @@ -458,7 +458,6 @@ int setupnewuser(const userec_t *user); int regform_estimate_queuesize(); void new_register(void); void check_register(void); -void check_birthday(void); int check_regmail(char *email); // check and prompt for invalid reason; will str_lower() mail domain. void delregcodefile(void); @@ -710,6 +709,19 @@ int pwcuSetNickname (const char *nickname); int pwcuChessResult (int sigType, ChessGameResult); int pwcuSetChessEloRating(uint16_t elo_rating); int pwcuSaveUserFlags (); +int pwcuRegCompleteJustify (const char *justify); +int pwcuRegSetTemporaryJustify(const char *justify, const char *email); +int pwcuRegisterSetInfo (const char *rname, + const char *addr, + const char *career, + const char *phone, + const char *email, + int mobile, + uint8_t sex, + uint8_t year, + uint8_t month, + uint8_t day, + uint8_t is_foreign); // non-important based variables (only save on exit) int pwcuSetSignature (unsigned char newsig); diff --git a/include/pttstruct.h b/include/pttstruct.h index cd0c98df..a79e2bb6 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -140,11 +140,12 @@ typedef struct userec_t { } PACKSTRUCT userec_t; #ifdef CONST_CUSER -# define cuser ((const userec_t ) pwcuser) +// const userec_t cuser; # define cuser_ref ((const userec_t*)&pwcuser) +# define cuser (*cuser_ref) #else -# define cuser pwcuser # define cuser_ref (&cuser) +# define cuser pwcuser #endif /* flags in userec_t.withme */ -- cgit v1.2.3