CPP   414

rasmol.h

Guest on 11th October 2021 10:00:33 AM

  1. /***************************************************************************
  2.  *                              RasMol 2.7.1                               *
  3.  *                                                                         *
  4.  *                                 RasMol                                  *
  5.  *                 Molecular Graphics Visualisation Tool                   *
  6.  *                                                             *
  7.  *                                                                         *
  8.  *                   Based on RasMol 2.6 by Roger Sayle                    *
  9.  * Biomolecular Structures Group, Glaxo Wellcome Research & Development,   *
  10.  *                      Stevenage, Hertfordshire, UK                       *
  11.  *         Version 2.6, August 1995, Version 2.6.4, December 1998          *
  12.  *                   Copyright (C) Roger Sayle                    *
  13.  *                                                                         *
  14.  *                  and Based on Mods by Arne Mueller                      *
  15.  *                      Version 2.6x1, May 1998                            *
  16.  *                   Copyright (C) Arne Mueller                     *
  17.  *                                                                         *
  18.  *           Version 2.7.0, 2.7.1 Mods by Herbert J. Bernstein             *
  19.  *           Bernstein + Sons, P.O. Box 177, Bellport, NY, USA             *
  20.  *                      yaya@bernstein-plus-sons.com                       *
  21.  *                    2.7.0 March 1999, 2.7.1 June 1999                    *
  22.  *              Copyright (C) Herbert J. Bernstein           *
  23.  *                                                                         *
  24.  * Please read the file NOTICE for important notices which apply to this   *
  25.  * package. If you are not going to make changes to RasMol, you are not    *
  26.  * only permitted to freely make copies and distribute them, you are       *
  27.  * encouraged to do so, provided you do the following:                     *
  28.  *   * 1. Either include the complete documentation, especially the file   *
  29.  *     NOTICE, with what you distribute or provide a clear indication      *
  30.  *     where people can get a copy of the documentation; and               *
  31.  *   * 2. Please give credit where credit is due citing the version and    *
  32.  *     original authors properly; and                                      *
  33.  *   * 3. Please do not give anyone the impression that the original       *
  34.  *     authors are providing a warranty of any kind.                       *
  35.  *                                                                         *
  36.  * If you would like to use major pieces of RasMol in some other program,  *
  37.  * make modifications to RasMol, or in some other way make what a lawyer   *
  38.  * would call a "derived work", you are not only permitted to do so, you   *
  39.  * are encouraged to do so. In addition to the things we discussed above,  *
  40.  * please do the following:                                                *
  41.  *   * 4. Please explain in your documentation how what you did differs    *
  42.  *     from this version of RasMol; and                                    *
  43.  *   * 5. Please make your modified source code available.                 *
  44.  *                                                                         *
  45.  * This version of RasMol is not in the public domain, but it is given     *
  46.  * freely to the community in the hopes of advancing science. If you make  *
  47.  * changes, please make them in a responsible manner, and please offer us  *
  48.  * the opportunity to include those changes in future versions of RasMol.  *
  49.  ***************************************************************************/
  50.  
  51. /* rasmol.h
  52.  */
  53.  
  54.  
  55. /*===========================*/
  56. /*  User Definable Options!  */
  57. /*===========================*/
  58.  
  59. /* #define IBMPC        */
  60. /* #define MSWIN        */
  61. /* #define APPLEMAC     */
  62. /* #define X11WIN       */
  63. #define UNIX
  64.  
  65. /* #define DIALBOX      */
  66. #define SOCKETS
  67. #define TERMIOS
  68. #define PROFILE
  69. /* #define MITSHM       */
  70.  
  71. /* #define HAVEZLIB     */
  72. /* #define HAVELIBJPEG  */
  73. /* #define HAVELIBPNG   */
  74.  
  75. /* #define MMIOLIB      */
  76. /* #define CEXIOLIB     */
  77.  
  78. #if !defined(EIGHTBIT) && !defined(THIRTYTWOBIT) && !defined(SIXTEENBIT)
  79. /* #define THIRTYTWOBIT */
  80. /* #define SIXTEENBIT   */
  81. /* #define EIGHTBIT     */
  82. #endif
  83.  
  84.  
  85. /*========================*/
  86. /*  Default User Options! */
  87. /*========================*/
  88.  
  89. #ifdef IBMPC
  90. #undef THIRTYTWOBIT
  91. #undef SIXTEENBIT
  92. #endif
  93.  
  94. #if !defined(EIGHTBIT) && !defined(THIRTYTWOBIT) && !defined(SIXTEENBIT)
  95. #define EIGHTBIT
  96. #endif
  97.  
  98. #ifndef RASMOLDIR
  99. #ifdef IBMPC
  100. #define RASMOLDIR  "C:\\RASWIN\\"
  101. #endif
  102.  
  103. #if !defined(IBMPC) && !defined(APPLEMAC) && !defined(VMS)
  104. #define RASMOLDIR "/usr/local/lib/rasmol/"
  105. #endif
  106. #endif
  107.  
  108. #if !defined(INVERT) && defined(IBMPC)
  109. #define INVERT
  110. #endif
  111.  
  112. #if !defined(TIME) && defined(VMS)
  113. #define TIME
  114. #endif
  115.  
  116.  
  117. /*==============================*/
  118. /*  Application-wide Constants  */
  119. /*==============================*/
  120.  
  121. #define MAIN_COPYRIGHT "Copyright (C) Roger Sayle 1992-1999"
  122. #define VERSION "2.7.1"
  123. #define VER_COPYRIGHT "Copyright (C) Herbert J. Bernstein 1998-1999"
  124. #define VER_DATE "June 1999"
  125.  
  126.  
  127. #ifndef True
  128. #define True  1
  129. #define False 0
  130. #endif
  131.  
  132. #ifndef PI   /* Avoid Linux Warnings! */
  133. #define PI   3.14159265358979323846
  134. #endif
  135.  
  136.  
  137. typedef double Real;
  138. #ifndef APPLEMAC
  139. typedef unsigned char Byte;
  140. #endif
  141.  
  142. #ifdef __STDC__
  143. typedef signed char Char;
  144. #else
  145. typedef char Char;
  146. #endif
  147.  
  148. #ifdef _LONGLONG
  149. typedef unsigned int Card;
  150. typedef int Long;
  151. #else
  152. typedef unsigned long Card;
  153. typedef long Long;
  154. #endif
  155.  
  156. #ifdef EIGHTBIT
  157. typedef unsigned char Pixel;
  158. #else
  159. #ifdef THIRTYTWOBIT
  160. typedef Long Pixel;
  161. #else
  162. typedef short Pixel;
  163. #endif
  164. #endif
  165.  
  166.  
  167. #if defined(__sgi)
  168. #define UnusedArgument(x)  ((x)=(x))
  169. #else
  170. #define UnusedArgument(x)
  171. #endif
  172.  
  173.  
  174. #define Rad2Deg      (180.0/PI)
  175. #define Deg2Rad      (PI/180.0)
  176. #define AbsFun(a)    (((a)<0)? -(a) : (a))
  177. #define MinFun(a,b)  (((a)<(b))? (a) : (b) )
  178. #define MaxFun(a,b)  (((a)>(b))? (a) : (b) )
  179.  
  180. #if defined(__STDC__) || defined(IBMPC)  || defined(APPLEMAC) || defined(__sgi)
  181. #define ToUpper(x)   (toupper((x)))
  182. #else
  183. #define ToUpper(x)   (islower((x))?toupper((x)):(x))
  184. #endif
  185.  
  186.  
  187. #if !defined(IBMPC) || defined(_WIN32)
  188. #ifdef APPLEMAC
  189. #define _fmalloc   NewPtrSys
  190. #define _ffree(x)  DisposePtr((Ptr)(x))
  191. #else
  192. #define _fmalloc   malloc
  193. #define _ffree     free
  194. #endif
  195. #define _fstrnicmp strnicmp
  196. #define _fstrcmp   strcmp
  197. #define _fmemset   memset
  198. #define __huge
  199. #define __far
  200. #endif
  201.  
  202.  
  203. #define ItemCount       8
  204. #define AdvPickAtom     0
  205. #define AdvPickNumber   1
  206. #define AdvSelectCount  2
  207. #define AdvName         3
  208. #define AdvIdent        4
  209. #define AdvClass        5
  210. #define AdvImage        6
  211. #define AdvPickCoord    7
  212.  
  213.  
  214. void WriteChar( int );
  215. void WriteString( char* );
  216. void RasMolFatalExit( char* );
  217. void AdviseUpdate( int );
  218. void RefreshScreen( void );
  219. void RasMolExit( void );
  220.  
  221. #ifdef APPLEMAC
  222. #include "rasmac.h"
  223. #endif

Raw Paste


Login or Register to edit or fork this paste. It's free.