head 1.2; access; symbols petidomo-2-2:1.1.1.1 petidomo:1.1.1; locks; strict; comment @ * @; 1.2 date 2000.12.13.15.14.26; author simons; state dead; branches; next 1.1; 1.1 date 2000.12.13.13.19.25; author simons; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.12.13.13.19.25; author simons; state Exp; branches; next ; desc @@ 1.2 log @Renamed unregsig module to signature. Now that Petidomo is released under GPL, there is no such thing as an "unregistered" version anymore. @ text @/* * $Source: /d1/e/petidomo/cvs/petidomo/source/unregsig.c,v $ * $Revision: 1.1 $ * $Date: 2000/12/13 13:19:25 $ * * Copyright (C) 1996 by CyberSolutions GmbH. * All rights reserved. */ #include #include #include #include #include #ifndef RUSAGE_SELF # define RUSAGE_SELF 0 #endif #ifndef RUSAGE_CHILDREN # define RUSAGE_CHILDREN -1 #endif #include #include "version.h" void AppendSignature(FILE * fh) { #ifdef COMMERCIAL_VERSION const struct PD_Config * MasterConfig = getMasterConfig(); #endif struct utsname machine_name; struct rusage resource_usage; #ifdef COMMERCIAL_VERSION char whoami[] = VERS " (commercial)"; #else char whoami[] = VERS " (non-commercial)"; #endif whoami[0] = 'P'; /* cosmetics */ #ifdef COMMERCIAL_VERSION if (MasterConfig->show_stats == TRUE) { #endif /* Start with the part of the signature that never fails. */ fflush(fh); fprintf(fh, "\n\n-- \n"); fprintf(fh, " /*\n"); fprintf(fh, " * Listserver software: %s\n", whoami); /* Determine what machine we are. */ if (uname(&machine_name) == 0) { fprintf(fh, " * Server hardware : %s-%s\n", machine_name.sysname, machine_name.machine); } /* Determine our resource usage. */ getrusage(RUSAGE_SELF, &resource_usage); fprintf(fh, " * Utilized cpu time : %ld.%ld seconds\n", resource_usage.ru_utime.tv_sec + resource_usage.ru_stime.tv_sec, resource_usage.ru_utime.tv_usec + resource_usage.ru_stime.tv_usec); fprintf(fh, " * Utilized memory : %ld KByte\n", (resource_usage.ru_idrss > 0) ? resource_usage.ru_idrss : (long int)sbrk(0) / 1024); /* Close signature. */ fprintf(fh, " */\n"); fflush(fh); #ifdef COMMERCIAL_VERSION } #endif } @ 1.1 log @Initial revision @ text @d2 3 a4 3 * $Source: /usr/local/libdata/cvs/simons/petidomo/src/petidomo/unregsig.c,v $ * $Revision: 1.7 $ * $Date: 1998/08/15 13:01:51 $ @ 1.1.1.1 log @Imported Petidomo 2.2 as found on www.petidomo.com. @ text @@