ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/smi23d/src/mengine/pcwin.h
Revision: 3
Committed: Mon Jun 9 21:38:26 2008 UTC (11 years, 5 months ago) by tjod
File size: 1828 byte(s)
Log Message:
test

Line File contents
1 #if defined __APPLE__
2 #define PCM_MAC
3 #elif defined linux
4 #define PCM_LINUX
5 #elif defined __CYGWIN__
6 #define PCM_LINUX
7 #endif
8
9 #undef PCM_WIN
10 /* #define PCM_MAC */
11 /* #undef PCM_LINUX */
12
13 #define TRUE True
14 #define FALSE False
15
16 #ifndef PI /* Avoid Linux Warnings! */
17 #define PI 3.14159265358979323846
18 #endif
19
20 #define Rad2Deg (180.0/PI)
21 #define Deg2Rad (PI/180.0)
22 #define AbsFun(a) (((a)<0)? -(a) : (a))
23 #define MinFun(a,b) (((a)<(b))? (a) : (b) )
24 #define MaxFun(a,b) (((a)>(b))? (a) : (b) )
25
26
27 #ifdef PCM_WIN
28
29 #include <malloc.h>
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <string.h>
33 #include <direct.h>
34 #include <ctype.h>
35 #include <math.h>
36 #include <limits.h>
37 #define strnicmp strncasecmp
38 #endif
39
40 #ifdef PCM_MAC
41 #include <Carbon/Carbon.h>
42 #endif
43
44 #ifdef PCM_LINUX
45 #include <stdio.h>
46 #include <sys/signal.h>
47 #include <limits.h>
48 #include <stdlib.h>
49 #include <string.h>
50 #include <ctype.h>
51 #include <math.h>
52 #ifndef FREEBSD
53 #include <malloc.h>
54 #endif
55 #define MAX_ARGS 15
56 #endif
57
58
59 #define DISPLAY 1
60 #define CTRL 2
61 #define ALL 3
62
63 EXTERN char szarString[128];
64 EXTERN char szarAppName[20];
65 EXTERN char szarDRAWINGAppName[30];
66 EXTERN char szarOutputName[30];
67 EXTERN char szarPlt1AngName[30];
68 EXTERN char szarCompareName[30];
69
70 struct FileInfoStruct {
71 int ftype ;
72 char path[255] ;
73 char fname[255] ;
74 } ;
75
76 typedef struct FileInfoStruct Boxstruct;
77 EXTERN Boxstruct Openbox ,Savebox;
78
79 #ifdef PCM_WIN
80 //int strcasecmp(char *,char *);
81 //int strncasecmp(char *,char *,int);
82 #endif // Windows
83
84 #ifdef PCM_LINUX
85 /* Motif Specific */
86 extern char * fexists_error_message ( void ) ;
87 extern void * malloc_filename ( char * , char * ) ;
88 extern int fexists_path ( char * , char * ) ;
89 extern FILE * fopen_path ( char * , char * , char * ) ;
90 extern void fullpath_to_fileinfo ( char * , Boxstruct * ) ;
91 #endif