head 1.5; access; symbols PETIDOMO_4_0b6:1.5 PETIDOMO_4_0b5:1.5 PETIDOMO_4_0b4:1.5 PETIDOMO_4_0b3:1.5 BEFORETHL:1.5 petidomo-2-2:1.1.1.1 petidomo:1.1.1; locks; strict; comment @ * @; 1.5 date 2001.01.19.14.56.33; author rse; state Exp; branches; next 1.4; 1.4 date 2001.01.18.20.30.50; author rse; state Exp; branches; next 1.3; 1.3 date 2000.12.15.15.48.00; author simons; state Exp; branches; next 1.2; 1.2 date 2000.12.13.15.35.14; author simons; state Exp; branches; next 1.1; 1.1 date 2000.12.13.13.19.24; author simons; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.12.13.13.19.24; author simons; state Exp; branches; next ; desc @@ 1.5 log @Get rid of all complaints from GCC 2.97 (except for two things which I do not want to change on my own) @ text @/* $Source: /e/ossp/cvs/ossp-pkg/petidomo/password.c,v $ $Revision: 1.4 $ Copyright (C) 2000 by CyberSolutions GmbH, Germany. This file is part of Petidomo. Petidomo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Petidomo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include #include #include "petidomo.h" static const char * s_password = NULL; extern char * g_currLine; int setPassword(struct Mail * MailStruct, const char * param1, const char * param2, const char * defaultlist) { char * p; char * q; /* Find the beginning of the parameter. */ p = g_currLine; while(*p && !isspace((int)*p)) p++; while(*p && isspace((int)*p)) p++; /* If the rest is empty, there ain't no fucking password. */ if (*p == '\0' || strlen(p) == 0) return 0; /* Cut trailing blanks. */ q = p + strlen(p); while(isspace((int)q[-1])) q--; *q = '\0'; /* Okay, check for quotes and that's it then. */ if (*p == '\"' && q[-1] == '\"') { p++; q[-1] = '\0'; } /* Store the result. */ s_password = p; return 0; } const char * getPassword(void) { return s_password; } @ 1.4 log @As we agreed today, Petidomo is now open because licensed under GPL and always will be licensed under GPL, so use "Petidomo" as the program name everywhere and consistently. @ text @d3 1 a3 1 $Revision: 1.3 $ d21 1 @ 1.3 log @ - Removed all debugging code. Now that Petidomo will be "rewritten" in C++, I need a new paradigm for debugging anyway and the old solution of mine was to messy for my taste anyway. - Petidomo no longer cares under what name it has been started. The different modes of operation will now be distinguished by a mandatory command line parameter. @ text @d2 2 a3 2 $Source: /d1/e/petidomo/cvs/petidomo/source/password.c,v $ $Revision: 1.2 $ d7 1 a7 1 This file is part of OpenPetidomo. d9 1 a9 1 OpenPetidomo is free software; you can redistribute it and/or modify d14 1 a14 1 OpenPetidomo is distributed in the hope that it will be useful, but @ 1.2 log @ - Added correct GNU GPL copyright statements to the files. - Removed unnecessary include statements. @ text @d2 2 a3 2 $Source$ $Revision$ a34 2 debug((DEBUG_COMMAND, 3, "setPassword(\"%s\").", param1)); a63 1 debug((DEBUG_COMMAND, 2, "Setting current password to \"%s\".", p)); @ 1.1 log @Initial revision @ text @d2 17 a18 7 * $Source: /usr/local/libdata/cvs/simons/petidomo/src/petidomo/password.c,v $ * $Revision: 1.7 $ * $Date: 1998/08/14 22:54:40 $ * * Copyright (C) 1996 by CyberSolutions GmbH. * All rights reserved. */ d21 1 a21 2 #include @ 1.1.1.1 log @Imported Petidomo 2.2 as found on www.petidomo.com. @ text @@