File: std.h

package info (click to toggle)
curves 0.8.7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 704 kB
  • ctags: 1,001
  • sloc: cpp: 6,197; ansic: 519; makefile: 270; sh: 192; fortran: 149
file content (108 lines) | stat: -rw-r--r-- 2,649 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* std.h			-*- C++ -*-
   $Id: std.h,v 1.12 1998/07/27 05:42:08 elf Exp $
   
   written by Marc Singer
   23 Oct 1996

   This file is part of the project CurVeS.  See the file README for
   more information.

   Copyright (C) 1996 Marc Singer

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   in a file called COPYING along with this program; if not, write to
   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
   02139, USA.

   -----------
   DESCRIPTION
   -----------

   Standard Header inclusion for all files in the project.  This
   inclusion ought (dare I say MUST) be first.

*/

#if !defined (__STD_H__)
#    define   __STD_H__

/* ----- Includes */

#include "build.h"		// Build parameters, always first

#if defined (HAVE_CONFIG_H)
# include "config.h"		// Autoconf configuration header
#endif

#include "debug.h"		// Our local debug code

#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#if defined (STDC_HEADERS)
# include <stdlib.h>
# include <stdio.h>
#endif
#if defined (HAVE_FCNTL_H)
# include <fcntl.h>
#endif
#include <memory.h>
#if defined (HAVE_STRING_H)
# include <string.h>
#endif
#if defined (HAVE_STRINGS_H)
# include <strings.h>
#endif
#include <ctype.h>
#if defined (HAVE_MALLOC_H)
# include <malloc.h>
#endif

#include "porting.h"

/* ----- Cope with missing standard functions */

#if !defined (STDC_HEADERS)
# if !defined (HAVE_MEMCPY)
#  define memcpy(d,s,n)		bcopy((s),(d),(n))
#  define memmove(d,s,n)	bcopy((s),(d),(n))
# endif
#endif 

/* ----- Determine how to implement mouse, if requested */
#if defined (USE_MOUSE)
# if defined (HAVE_GPM_H)
#  define USE_GPM_MOUSE
# else
#  undef USE_MOUSE		// Sorry, no can do 
# endif
#endif

#if !defined (__CONSTVALUE)
# define __CONSTVALUE __const
#endif

// #include "preferences.h"	// Each must get into the pref scene itself

// ----- Typedefs

typedef signed char int8;
typedef unsigned char unsigned8;
typedef short int16;
typedef unsigned short unsigned16;
typedef signed long int32;
typedef signed long long int64;
typedef unsigned long unsigned32;
typedef unsigned long long unsigned64;

#endif  /* __STD_H__ */