ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/init.C
(Generate patch)

Comparing deliantra/server/server/init.C (file contents):
Revision 1.75 by root, Fri Nov 6 13:31:47 2009 UTC vs.
Revision 1.76 by root, Sun Nov 29 10:55:18 2009 UTC

30/* This loads the settings file. There could be debate whether this should 30/* This loads the settings file. There could be debate whether this should
31 * be here or in the common directory - but since only the server needs this 31 * be here or in the common directory - but since only the server needs this
32 * information, having it here probably makes more sense. 32 * information, having it here probably makes more sense.
33 */ 33 */
34void 34void
35load_settings (void) 35load_settings ()
36{ 36{
37 char buf[MAX_BUF], *cp; 37 char buf[MAX_BUF], *cp;
38 int has_val, comp; 38 int has_val, comp;
39 FILE *fp; 39 FILE *fp;
40 40
363 cfperl_init (); 363 cfperl_init ();
364 init_done = 1; 364 init_done = 1;
365} 365}
366 366
367void 367void
368usage (void) 368usage ()
369{ 369{
370 fprintf (stderr, "Usage: deliantra-server [-h] [-<flags>]...\n"); 370 fprintf (stderr, "Usage: deliantra-server [-h] [-<flags>]...\n");
371} 371}
372 372
373void 373void
374help (void) 374help ()
375{ 375{
376 376
377/* The information in usage is redundant with what is given below, so why call it? */ 377/* The information in usage is redundant with what is given below, so why call it? */
378 378
379/* usage();*/ 379/* usage();*/
463 signal (SIGINT , SIG_DFL); 463 signal (SIGINT , SIG_DFL);
464 signal (SIGTERM, SIG_DFL); 464 signal (SIGTERM, SIG_DFL);
465} 465}
466 466
467void 467void
468init_signals (void) 468init_signals ()
469{ 469{
470 // large stack, but it's important data we want to save, and it is not usually 470 // large stack, but it's important data we want to save, and it is not usually
471 // being physically allocated anyways 471 // being physically allocated anyways
472 const size_t stacksize = 8 * 1024 * 1024 + SIGSTKSZ; 472 const size_t stacksize = 8 * 1024 * 1024 + SIGSTKSZ;
473 473
549 * overwrites old 'race' entries. This routine allow us to quickly 549 * overwrites old 'race' entries. This routine allow us to quickly
550 * re-configure the 'alignment' of monsters, objects. Useful for 550 * re-configure the 'alignment' of monsters, objects. Useful for
551 * putting together lists of creatures, etc that belong to gods. 551 * putting together lists of creatures, etc that belong to gods.
552 */ 552 */
553static void 553static void
554init_races (void) 554init_races ()
555{ 555{
556 FILE *file; 556 FILE *file;
557 char race[MAX_BUF], fname[MAX_BUF], buf[MAX_BUF], *cp, variable[MAX_BUF]; 557 char race[MAX_BUF], fname[MAX_BUF], buf[MAX_BUF], *cp, variable[MAX_BUF];
558 archetype *mon = NULL; 558 archetype *mon = NULL;
559 static int init_done = 0; 559 static int init_done = 0;
634 fclose (file); 634 fclose (file);
635 LOG (llevDebug, "done.\n"); 635 LOG (llevDebug, "done.\n");
636} 636}
637 637
638void 638void
639init_beforeplay (void) 639init_beforeplay ()
640{ 640{
641 init_artifacts (); /* If not called before, reads all artifacts from file */ 641 init_artifacts (); /* If not called before, reads all artifacts from file */
642 init_races (); /* overwrite race designations using entries in lib/races file */ 642 init_races (); /* overwrite race designations using entries in lib/races file */
643 init_gods (); /* init linked list of gods from archs */ 643 init_gods (); /* init linked list of gods from archs */
644 init_readable (); /* inits useful arrays for readable texts */ 644 init_readable (); /* inits useful arrays for readable texts */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines