Mercurial > noffle
comparison src/noffle.c @ 61:adf0af5152f7 noffle
[svn] Renamed some variables and function names, because they caused compiler
warnings because of shadowing global variables from system include files
(index, stat, serv).
author | enz |
---|---|
date | Fri, 12 May 2000 18:19:38 +0100 |
parents | 125d79c9e586 |
children | 1fcdced0246e |
comparison
equal
deleted
inserted
replaced
60:defaa632baae | 61:adf0af5152f7 |
---|---|
1 /* | 1 /* |
2 noffle.c | 2 noffle.c |
3 | 3 |
4 Main program. Implements specified actions, but running as server, which | 4 Main program. Implements specified actions, but running as server, which |
5 is done by Serv_run(), declared in server.h. | 5 is done by Server_run(), declared in server.h. |
6 | 6 |
7 Locking policy: lock access to databases while noffle is running, but | 7 Locking policy: lock access to databases while noffle is running, but |
8 not as server. If noffle runs as server, locking is performed while | 8 not as server. If noffle runs as server, locking is performed while |
9 executing NNTP commands, but temporarily released if no new command is | 9 executing NNTP commands, but temporarily released if no new command is |
10 received for some seconds (to allow multiple clients connect at the same | 10 received for some seconds (to allow multiple clients connect at the same |
11 time). | 11 time). |
12 | 12 |
13 $Id: noffle.c 60 2000-05-09 22:28:38Z uh1763 $ | 13 $Id: noffle.c 67 2000-05-12 17:19:38Z enz $ |
14 */ | 14 */ |
15 | 15 |
16 #if HAVE_CONFIG_H | 16 #if HAVE_CONFIG_H |
17 #include <config.h> | 17 #include <config.h> |
18 #endif | 18 #endif |
353 case THREAD: | 353 case THREAD: |
354 modeStr = "thread"; break; | 354 modeStr = "thread"; break; |
355 case OVER: | 355 case OVER: |
356 modeStr = "over"; break; | 356 modeStr = "over"; break; |
357 } | 357 } |
358 printf( "%s %s %s\n", name, Grp_serv( name ), modeStr ); | 358 printf( "%s %s %s\n", name, Grp_server( name ), modeStr ); |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 /* A modify command. argc/argv start AFTER '-m'. */ | 362 /* A modify command. argc/argv start AFTER '-m'. */ |
363 static Bool | 363 static Bool |
435 strftime( dateLastAccess, MAXCHAR, "%Y-%m-%d %H:%M:%S", | 435 strftime( dateLastAccess, MAXCHAR, "%Y-%m-%d %H:%M:%S", |
436 localtime( &lastAccess ) ); | 436 localtime( &lastAccess ) ); |
437 strftime( dateCreated, MAXCHAR, "%Y-%m-%d %H:%M:%S", | 437 strftime( dateCreated, MAXCHAR, "%Y-%m-%d %H:%M:%S", |
438 localtime( &created ) ); | 438 localtime( &created ) ); |
439 printf( "%s\t%s\t%i\t%i\t%i\t%c\t%s\t%s\t%s\n", | 439 printf( "%s\t%s\t%i\t%i\t%i\t%c\t%s\t%s\t%s\n", |
440 g, Grp_serv( g ), Grp_first( g ), Grp_last( g ), | 440 g, Grp_server( g ), Grp_first( g ), Grp_last( g ), |
441 Grp_rmtNext( g ), Grp_postAllow( g ), dateCreated, | 441 Grp_rmtNext( g ), Grp_postAllow( g ), dateCreated, |
442 dateLastAccess, Grp_dsc( g ) ); | 442 dateLastAccess, Grp_dsc( g ) ); |
443 } | 443 } |
444 while ( Grp_nextGrp( &g ) ); | 444 while ( Grp_nextGrp( &g ) ); |
445 } | 445 } |
746 doQuery(); | 746 doQuery(); |
747 } | 747 } |
748 break; | 748 break; |
749 case 'r': | 749 case 'r': |
750 Log_inf( "Starting as server" ); | 750 Log_inf( "Starting as server" ); |
751 Serv_run(); | 751 Server_run(); |
752 break; | 752 break; |
753 case 'R': | 753 case 'R': |
754 doRequested( optarg ); | 754 doRequested( optarg ); |
755 break; | 755 break; |
756 case 's': | 756 case 's': |