~ubuntu-branches/ubuntu/natty/glbsp/natty

« back to all changes in this revision

Viewing changes to nodeview/system.h

  • Committer: Bazaar Package Importer
  • Author(s): Darren Salt
  • Date: 2008-01-30 13:33:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080130133349-kgojg33vyiu8xbvp
Tags: 2.24-1
* New upstream release.
* Bumped the lib soname and the library package name due to one silly
  little binary incompatibility caused by changes in an exported struct.
  (Safe; nothing else currently in the archive has ever used libglbsp2.)
* Removed my patches since they're all applied upstream.
* Updated the list of documentation files.
* Build-time changes:
  - Switched from dh_movefiles to dh_install.
  - Updated my makefile to cope with upstream changes.
  - Corrected for debian-rules-ignores-make-clean-error.
  - Corrected for substvar-source-version-is-deprecated.
  - Link libglbsp, rather than glbsp, with libm and libz.
* Fixed shlibdeps. (Closes: #460387)
* Bumped standards version to 3.7.3 (no other changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//------------------------------------------------------------------------
 
2
//  SYSTEM : System specific code
 
3
//------------------------------------------------------------------------
 
4
//
 
5
//  GL-Node Viewer (C) 2004-2007 Andrew Apted
 
6
//
 
7
//  This program is free software; you can redistribute it and/or
 
8
//  modify it under the terms of the GNU General Public License
 
9
//  as published by the Free Software Foundation; either version 2
 
10
//  of the License, or (at your option) any later version.
 
11
//
 
12
//  This program is distributed in the hope that it will be useful,
 
13
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
//  GNU General Public License for more details.
 
16
//
 
17
//------------------------------------------------------------------------
 
18
 
 
19
#ifndef __NODEVIEW_SYSTEM_H__
 
20
#define __NODEVIEW_SYSTEM_H__
 
21
 
 
22
 
 
23
/* ----- basic types and macros ---------------------------- */
 
24
 
 
25
typedef char  sint8_g;
 
26
typedef short sint16_g;
 
27
typedef int   sint32_g;
 
28
   
 
29
typedef unsigned char  uint8_g;
 
30
typedef unsigned short uint16_g;
 
31
typedef unsigned int   uint32_g;
 
32
 
 
33
typedef double angle_g;  // degrees, 0 is E, 90 is N
 
34
 
 
35
 
 
36
/* ----- function prototypes ---------------------------- */
 
37
 
 
38
// fatal error messages (these don't return)
 
39
void FatalError(const char *str, ...);
 
40
void InternalError(const char *str, ...);
 
41
 
 
42
// display normal messages & warnings to the screen
 
43
void PrintMsg(const char *str, ...);
 
44
void PrintWarn(const char *str, ...);
 
45
 
 
46
// argument handling
 
47
extern const char **arg_list;
 
48
extern int arg_count;
 
49
 
 
50
void ArgvInit(int argc, const char **argv);
 
51
void ArgvTerm(void);
 
52
int ArgvFind(char short_name, const char *long_name, int *num_params = NULL);
 
53
bool ArgvIsOption(int index);
 
54
 
 
55
// endian handling
 
56
void InitEndian(void);
 
57
uint16_g Endian_U16(uint16_g);
 
58
uint32_g Endian_U32(uint32_g);
 
59
 
 
60
// these are only used for debugging
 
61
void InitDebug(bool enable);
 
62
void TermDebug(void);
 
63
void PrintDebug(const char *str, ...);
 
64
 
 
65
 
 
66
/* ----- conversion macros ----------------------- */
 
67
 
 
68
#define UINT8(x)   ((uint8_g) (x))
 
69
#define SINT8(x)   ((sint8_g) (x))
 
70
 
 
71
#define UINT16(x)  Endian_U16(x)
 
72
#define UINT32(x)  Endian_U32(x)
 
73
 
 
74
#define SINT16(x)  ((sint16_g) Endian_U16((uint16_g) (x)))
 
75
#define SINT32(x)  ((sint32_g) Endian_U32((uint32_g) (x)))
 
76
 
 
77
 
 
78
#endif /* __NODEVIEW_SYSTEM_H__ */