Annotation of sbbs/sbbs3/gen_defs.h, revision 1.1

1.1     ! root        1: /* gen_defs.h */
        !             2: 
        !             3: /* Synchronet general constant and macro definitions */
        !             4: 
        !             5: /* $Id: gen_defs.h,v 1.9 2000/11/02 12:45:06 rswindell Exp $ */
        !             6: 
        !             7: /****************************************************************************
        !             8:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
        !             9:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
        !            10:  *                                                                                                                                                     *
        !            11:  * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html         *
        !            12:  *                                                                                                                                                     *
        !            13:  * This program is free software; you can redistribute it and/or                       *
        !            14:  * modify it under the terms of the GNU General Public License                         *
        !            15:  * as published by the Free Software Foundation; either version 2                      *
        !            16:  * of the License, or (at your option) any later version.                                      *
        !            17:  * See the GNU General Public License for more details: gpl.txt or                     *
        !            18:  * http://www.fsf.org/copyleft/gpl.html                                                                                *
        !            19:  *                                                                                                                                                     *
        !            20:  * Anonymous FTP access to the most recent released source is available at     *
        !            21:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
        !            22:  *                                                                                                                                                     *
        !            23:  * Anonymous CVS access to the development source and modification history     *
        !            24:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
        !            25:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
        !            26:  *     (just hit return, no password is necessary)                                                     *
        !            27:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
        !            28:  *                                                                                                                                                     *
        !            29:  * For Synchronet coding style and modification guidelines, see                                *
        !            30:  * http://www.synchro.net/source.html                                                                          *
        !            31:  *                                                                                                                                                     *
        !            32:  * You are encouraged to submit any modifications (preferably in Unix diff     *
        !            33:  * format) via e-mail to [email protected]                                                                      *
        !            34:  *                                                                                                                                                     *
        !            35:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
        !            36:  ****************************************************************************/
        !            37: 
        !            38: #ifndef _GEN_DEFS_H
        !            39: #define _GEN_DEFS_H
        !            40: 
        !            41:                                                                        /* Control characters */
        !            42: #define STX    0x02                            /* Start of text                        ^B      */
        !            43: #define ETX    0x03                            /* End of text                          ^C      */
        !            44: #define BEL            0x07                            /* Bell/beep                            ^G      */
        !            45: #define FF             0x0c                            /* Form feed                            ^L      */
        !            46: #define ESC    0x1b                            /* Escape                                       ^[      */
        !            47: #define DEL            0x7f                            /* Delete                                       ^BS     */
        !            48: #define BS             '\b'                            /* Back space                           ^H      */
        !            49: #define TAB    '\t'                            /* Horizontal tabulation        ^I      */
        !            50: #define LF             '\n'                            /* Line feed                            ^J      */
        !            51: #define CR             '\r'                            /* Carriage return                      ^M      */
        !            52: #define SP             ' '                                     /* Space                                                */
        !            53: 
        !            54: #ifndef MAX_PATH
        !            55:        #ifdef MAXPATHLEN
        !            56:                #define MAX_PATH MAXPATHLEN     /* clib.h */
        !            57:        #elif defined PATH_MAX
        !            58:                #define MAX_PATH PATH_MAX
        !            59:        #elif defined _MAX_PATH
        !            60:                #define MAX_PATH _MAX_PATH
        !            61:        #else
        !            62:                #define MAX_PATH 260            
        !            63:        #endif
        !            64: #endif
        !            65: 
        !            66: /* Unsigned type short-hands   */
        !            67: #ifndef uchar
        !            68: #define uchar  unsigned char
        !            69: #endif
        !            70: #ifdef __GLIBC__
        !            71:        #include <sys/types.h>
        !            72: #else
        !            73:        #ifndef ushort
        !            74:        #define ushort  unsigned short
        !            75:        #define uint    unsigned int
        !            76:        #define ulong   unsigned long
        !            77:        #endif
        !            78: #endif
        !            79: 
        !            80: /* Windows Types */
        !            81: #ifndef BYTE
        !            82: #define BYTE   uchar
        !            83: #endif
        !            84: #ifndef WORD
        !            85: #define WORD   ushort
        !            86: #endif
        !            87: #ifndef DWORD
        !            88: #define DWORD  ulong
        !            89: #endif
        !            90: #ifndef BOOL
        !            91: #define BOOL   int
        !            92: #endif
        !            93: #ifndef TRUE
        !            94: #define TRUE   1
        !            95: #define FALSE  0
        !            96: #endif
        !            97: #ifndef HANDLE
        !            98: #define HANDLE void*
        !            99: #endif
        !           100: 
        !           101: 
        !           102: /****************************************************************************/
        !           103: /* MALLOC/FREE Macros for various compilers and environments                           */
        !           104: /* MALLOC is used for allocations of 64k or less                                                       */
        !           105: /* FREE is used to free buffers allocated with MALLOC                                          */
        !           106: /* LMALLOC is used for allocations of possibly larger than 64k                         */
        !           107: /* LFREE is used to free buffers allocated with LMALLOC                                        */
        !           108: /* REALLOC is used to re-size a previously MALLOCed or LMALLOCed buffer        */
        !           109: /* FAR16 is used to create a far (32-bit) pointer in 16-bit compilers          */
        !           110: /* HUGE16 is used to create a huge (32-bit) pointer in 16-bit compilers        */
        !           111: /****************************************************************************/
        !           112: #if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
        !           113:        #define HUGE16 huge
        !           114:        #define FAR16 far
        !           115:        #if defined(__TURBOC__)
        !           116:                #define REALLOC(x,y) farrealloc(x,y)
        !           117:                #define LMALLOC(x) farmalloc(x)
        !           118:                #define MALLOC(x) farmalloc(x)
        !           119:                #define LFREE(x) farfree(x)
        !           120:                #define FREE(x) farfree(x)
        !           121:        #elif defined(__WATCOMC__)
        !           122:                #define REALLOC realloc
        !           123:                #define LMALLOC(x) halloc(x,1)  /* far heap, but slow */
        !           124:                #define MALLOC malloc                   /* far heap, but 64k max */
        !           125:                #define LFREE hfree
        !           126:                #define FREE free
        !           127:        #else   /* Other 16-bit Compiler */
        !           128:                #define REALLOC realloc
        !           129:                #define LMALLOC malloc
        !           130:                #define MALLOC malloc
        !           131:                #define LFREE free
        !           132:                #define FREE free
        !           133:        #endif
        !           134: #else          /* 32-bit Compiler or Small Memory Model */
        !           135:        #define HUGE16
        !           136:        #define FAR16
        !           137:        #define REALLOC realloc
        !           138:        #define LMALLOC malloc
        !           139:        #define MALLOC malloc
        !           140:        #define LFREE free
        !           141:        #define FREE free
        !           142: #endif
        !           143: 
        !           144: 
        !           145: #endif /* Don't add anything after this #endif statement */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.