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

Comparing deliantra/server/common/readable.C (file contents):
Revision 1.53 by root, Fri Nov 6 13:45:28 2009 UTC vs.
Revision 1.54 by root, Sun Nov 29 10:55:18 2009 UTC

504 * Start of misc. readable functions used by others functions in this file 504 * Start of misc. readable functions used by others functions in this file
505 * 505 *
506 *****************************************************************************/ 506 *****************************************************************************/
507 507
508static titlelist * 508static titlelist *
509get_empty_booklist (void) 509get_empty_booklist ()
510{ 510{
511 titlelist *bl = new titlelist; 511 titlelist *bl = new titlelist;
512 512
513 bl->number = 0; 513 bl->number = 0;
514 bl->first_book = NULL; 514 bl->first_book = NULL;
515 bl->next = NULL; 515 bl->next = NULL;
516 return bl; 516 return bl;
517} 517}
518 518
519static title * 519static title *
520get_empty_book (void) 520get_empty_book ()
521{ 521{
522 title *t = new title; 522 title *t = new title;
523 523
524 t->name = NULL; 524 t->name = NULL;
525 t->archname = NULL; 525 t->archname = NULL;
619/* init_book_archive() - if not called before, initialise the info list 619/* init_book_archive() - if not called before, initialise the info list
620 * This reads in the bookarch file into memory. bookarch is the file 620 * This reads in the bookarch file into memory. bookarch is the file
621 * created and updated across multiple runs of the program. 621 * created and updated across multiple runs of the program.
622 */ 622 */
623static void 623static void
624init_book_archive (void) 624init_book_archive ()
625{ 625{
626 FILE *fp; 626 FILE *fp;
627 int comp, nroftitle = 0; 627 int comp, nroftitle = 0;
628 char buf[MAX_BUF], fname[MAX_BUF], *cp; 628 char buf[MAX_BUF], fname[MAX_BUF], *cp;
629 title *book = NULL; 629 title *book = NULL;
744 * 744 *
745 * This is the function called by the main routine to initialise 745 * This is the function called by the main routine to initialise
746 * all the readable information. 746 * all the readable information.
747 */ 747 */
748void 748void
749init_readable (void) 749init_readable ()
750{ 750{
751 static int did_this; 751 static int did_this;
752 752
753 if (did_this) 753 if (did_this)
754 return; 754 return;
1801 * Writeback routine for updating the bookarchive. 1801 * Writeback routine for updating the bookarchive.
1802 * 1802 *
1803 ****************************************************************************/ 1803 ****************************************************************************/
1804/* write_book_archive() - write out the updated book archive */ 1804/* write_book_archive() - write out the updated book archive */
1805void 1805void
1806write_book_archive (void) 1806write_book_archive ()
1807{ 1807{
1808 FILE *fp; 1808 FILE *fp;
1809 int index = 0; 1809 int index = 0;
1810 char fname[MAX_BUF]; 1810 char fname[MAX_BUF];
1811 title *book = NULL; 1811 title *book = NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines