nhlan.h

Go to the documentation of this file.
00001 /*      SCCS Id: @(#)nhlan.h    3.4     1997/04/12      */
00002 /* Copyright (c) Michael Allison, 1997                  */
00003 /* NetHack may be freely redistributed.  See license for details. */
00004 
00005 #ifndef NHLAN_H
00006 #define NHLAN_H
00007 /*
00008  * Here are the LAN features currently implemented:
00009  * LAN_MAIL             Mail facility allowing receipt and
00010  *                      reading of mail.
00011  * LAN_SHARED_BONES     Allows bones files to be stored on a
00012  *                      network share. (Does NOT imply compatibiliy
00013  *                      between unlike platforms)
00014  */
00015 
00016 # ifdef LAN_FEATURES
00017 #  ifdef LAN_MAIL
00018 #define MAIL
00019 #ifndef WIN32
00020 #define MAILCKFREQ        50
00021 #else
00022 /*
00023  * WIN32 port does the real mail lookups in a separate thread
00024  * and the NetHack core code really just checks a flag,
00025  * so that part of it can be done more often.  The throttle
00026  * for how often the mail thread should contact the mail
00027  * system is controlled by MAILTHREADFREQ and is expressed
00028  * in milliseconds.
00029  */
00030 #define MAILCKFREQ        5
00031 #define MAILTHREADFREQ    50000
00032 #endif
00033 
00034 #ifndef MAX_BODY_SIZE
00035 #define MAX_BODY_SIZE 1024
00036 #endif
00037 
00038 struct lan_mail_struct {
00039         char sender[120];
00040         char subject[120];
00041         boolean body_in_ram;    /* TRUE means body in memory not file */
00042         char filename[_MAX_PATH];
00043         char body[MAX_BODY_SIZE];
00044 };
00045 #  endif
00046 
00047 # endif /*LAN_FEATURES*/
00048 #endif /*NHLAN_H*/