Annotation of researchv9/X11/src/X.V11R1/server/include/os.h, revision 1.1.1.1

1.1       root        1: /***********************************************************
                      2: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
                      3: and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
                      4: 
                      5:                         All Rights Reserved
                      6: 
                      7: Permission to use, copy, modify, and distribute this software and its 
                      8: documentation for any purpose and without fee is hereby granted, 
                      9: provided that the above copyright notice appear in all copies and that
                     10: both that copyright notice and this permission notice appear in 
                     11: supporting documentation, and that the names of Digital or MIT not be
                     12: used in advertising or publicity pertaining to distribution of the
                     13: software without specific, written prior permission.  
                     14: 
                     15: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
                     16: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
                     17: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
                     18: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
                     19: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
                     20: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
                     21: SOFTWARE.
                     22: 
                     23: ******************************************************************/
                     24: 
                     25: /* $Header: os.h,v 1.18 87/09/10 18:00:15 toddb Exp $ */
                     26: 
                     27: #ifndef OS_H
                     28: #define OS_H
                     29: #include "misc.h"
                     30: 
                     31: #define NullFID ((FID) 0)
                     32: 
                     33: #define SCREEN_SAVER_ON   0
                     34: #define SCREEN_SAVER_OFF  1
                     35: #define SCREEN_SAVER_FORCER 2
                     36: 
                     37: #define MAX_REQUEST_SIZE 16384
                     38: 
                     39: typedef pointer        FID;
                     40: typedef struct _FontPathRec *FontPathPtr;
                     41: typedef struct _NewClientRec *NewClientPtr;
                     42: 
                     43: /*
                     44:  * os-dependent definition of local allocation and deallocation
                     45:  * If you need something other than malloc/free for ALLOCATE/DEALLOCATE
                     46:  * LOCAL then you add that to the beginning of this set.  Note that
                     47:  * some machines do not return a valid pointer for malloc(0), in
                     48:  * which case we provide an alternate under the control of the
                     49:  * define MALLOC_0_RETURNS_NULL.  This is necessary because some
                     50:  * server code expects malloc(0) to return a valid pointer to storage.
                     51:  */
                     52: #if defined(ibm032) && !defined(_pcc_)
                     53: 
                     54: #define ALLOCATE_LOCAL(size) (alloca(size))
                     55: #define DEALLOCATE_LOCAL(ptr)
                     56: pragma on(alloca);
                     57: 
                     58: #else /* everyone else */
                     59: 
                     60: # ifdef MALLOC_0_RETURNS_NULL
                     61: # define ALLOCATE_LOCAL(size) (malloc(max(size,1)))
                     62: # else
                     63: # define ALLOCATE_LOCAL(size) (malloc(size))
                     64: # endif
                     65: 
                     66: #define DEALLOCATE_LOCAL(ptr) (free(ptr))
                     67: 
                     68: #endif
                     69: 
                     70: extern WaitForSomething();
                     71: extern char *ReadRequestFromClient();   /* should be xReq but then 
                     72:                                           include Xproto.h */
                     73: extern Bool CloseDownConnection();
                     74: extern void CreateWellKnownSockets();
                     75: extern FontPathPtr GetFontPath();
                     76: extern FontPathPtr ExpandFontNamePattern();
                     77: extern FID FiOpenForRead();
                     78: extern int FiClose();
                     79: 
                     80: #endif /* OS_H */

unix.superglobalmegacorp.com

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