home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / gemlib27.lzh / GEMLIB27 / DIFFS < prev    next >
Text File  |  1993-07-30  |  12KB  |  452 lines

  1. *** 1.1    1991/07/03 14:40:46
  2. --- aesutil.c    1991/07/03 21:05:54
  3. ***************
  4. *** 51,58 ****
  5.   #include <aesbind.h>
  6.   #include <gemdefs.h>
  7.   #include <obdefs.h>
  8. ! EXTERN WORD    global[15];
  9. ! #define AESversion global[0]
  10.   #endif
  11.   
  12.   #include "portab.h"
  13. --- 51,58 ----
  14.   #include <aesbind.h>
  15.   #include <gemdefs.h>
  16.   #include <obdefs.h>
  17. ! #include <gemfast.h>
  18. ! #define AESversion gl_ap_version
  19.   #endif
  20.   
  21.   #include "portab.h"
  22. ***************
  23. *** 181,190 ****
  24.    */
  25.   MLOCAL VOID    FselInit( VOID )
  26.   {
  27. !     Supexec( init_fsvars );
  28.       save_path[0] = (char)Dgetdrv() + 'A';
  29.       save_path[1] = ':';
  30. !     Dgetpath( &save_path[2], 0 );
  31.   
  32.   #if MWC
  33.       if( AESversion >= 0x0140 )
  34. --- 181,190 ----
  35.    */
  36.   MLOCAL VOID    FselInit( VOID )
  37.   {
  38. !     (void)Supexec( init_fsvars );
  39.       save_path[0] = (char)Dgetdrv() + 'A';
  40.       save_path[1] = ':';
  41. !     (void)Dgetpath( &save_path[2], 0 );
  42.   
  43.   #if MWC
  44.       if( AESversion >= 0x0140 )
  45. ***************
  46. *** 543,549 ****
  47.   {
  48.       WORD    physid, pxy[8], clipxy[4];
  49.   
  50. ! #if __TURBOC__
  51.   MLOCAL MFDB    mfdb0;
  52.   #else
  53.   MLOCAL FDB    mfdb0;
  54. --- 543,549 ----
  55.   {
  56.       WORD    physid, pxy[8], clipxy[4];
  57.   
  58. ! #if __TURBOC__ || __GNUC__
  59.   MLOCAL MFDB    mfdb0;
  60.   #else
  61.   MLOCAL FDB    mfdb0;
  62. *** 1.1    1991/07/03 14:40:46
  63. --- aesutil.h    1991/07/03 21:05:54
  64. ***************
  65. *** 417,422 ****
  66. --- 417,424 ----
  67.   #endif
  68.   /* Goofy GNU binding for evnt_timer is more logical, but wrong.
  69.    * __OLD_WAY__ is provided for evnt_multi but not evnt_timer.
  70. +  *
  71. +  * This was corrected. ++jrb
  72.    */
  73.   
  74.   VOID    FormExit __PROTO(( OBJECT *tree, GRECT *rstart ));
  75. *** 1.1    1991/07/03 14:40:46
  76. --- faces.c    1991/07/03 21:05:54
  77. ***************
  78. *** 139,145 ****
  79.   
  80.       savedta = (struct _dta *)Fgetdta();
  81.       Fsetdta( &dta ); /* suspicious pointer conversion in TC */
  82. !     Fsfirst( fname, 7 );
  83.       Fsetdta( savedta ); /* suspicious pointer conversion in TC */
  84.   
  85.       *pbuf = NULL;
  86. --- 139,145 ----
  87.   
  88.       savedta = (struct _dta *)Fgetdta();
  89.       Fsetdta( &dta ); /* suspicious pointer conversion in TC */
  90. !     (void)Fsfirst( fname, 7 );
  91.       Fsetdta( savedta ); /* suspicious pointer conversion in TC */
  92.   
  93.       *pbuf = NULL;
  94. ***************
  95. *** 155,169 ****
  96.   
  97.       if( (fh = (short)Fopen(fname, 0)) < 0 )
  98.       {
  99. !     Mfree( buf );
  100.       return (long)fh;
  101.       }
  102.   
  103.       len = Fread( fh, dta.size, buf );
  104. !     Fclose( fh );
  105.       if( len != dta.size )
  106.       {
  107. !     Mfree( buf );
  108.       return AEREADF;
  109.       }
  110.   
  111. --- 155,169 ----
  112.   
  113.       if( (fh = (short)Fopen(fname, 0)) < 0 )
  114.       {
  115. !     (void)Mfree( buf );
  116.       return (long)fh;
  117.       }
  118.   
  119.       len = Fread( fh, dta.size, buf );
  120. !     (void)Fclose( fh );
  121.       if( len != dta.size )
  122.       {
  123. !     (void)Mfree( buf );
  124.       return AEREADF;
  125.       }
  126.   
  127. ***************
  128. *** 486,491 ****
  129.       form_alert( 1, alertp );
  130.       }
  131.   
  132. !     Mfree( fbuf );
  133.       return ret;
  134.   }
  135. --- 486,491 ----
  136.       form_alert( 1, alertp );
  137.       }
  138.   
  139. !     (void)Mfree( fbuf );
  140.       return ret;
  141.   }
  142. *** 1.1    1991/07/03 14:40:46
  143. --- fontform.c    1991/07/03 21:05:55
  144. ***************
  145. *** 43,48 ****
  146. --- 43,50 ----
  147.   #include <aesbind.h>
  148.   #include <gemdefs.h>
  149.   #include <obdefs.h>
  150. + #include <ctype.h>
  151. + #include <string.h>
  152.   #define strupr(s) { short i; for(i=0;s[i];i++) s[i] = toupper(s[i]); }
  153.   #endif
  154.   
  155. ***************
  156. *** 97,104 ****
  157. --- 99,110 ----
  158.   /* ----------------------------------------------------------------------
  159.    * Exit cleanly, with a return code.
  160.    */
  161. + #if ANSI_C
  162. + GLOBAL VOID    GemExit( short code )
  163. + #else
  164.   GLOBAL VOID    GemExit( code )
  165.   short        code;
  166. + #endif
  167.   {
  168.       if( wind > 0 )
  169.       {
  170. ***************
  171. *** 148,155 ****
  172.       vsf_interior( wsid, 0 ); /* hollow fill */
  173.       v_bar( wsid, pxy );
  174.   
  175.       if( !curstyle.pts 
  176. !     ||    (pfont = FsmFont(curstyle.face, curstyle.fx, &fx)) == NULL )
  177.       {
  178.       /*
  179.        * No font selected, use system font.
  180. --- 154,170 ----
  181.       vsf_interior( wsid, 0 ); /* hollow fill */
  182.       v_bar( wsid, pxy );
  183.   
  184. +     /*
  185. +      * pfont hoisted out here: otherwise because of short-circuit
  186. +      * condition evaluation, its possible it will never be evaluated.
  187. +      * it is used below in the code.
  188. +      *
  189. +      *  ++jrb
  190. +      */
  191. +     pfont = FsmFont(curstyle.face, curstyle.fx, &fx);
  192. +     
  193.       if( !curstyle.pts 
  194. !     ||    (pfont == NULL) )
  195.       {
  196.       /*
  197.        * No font selected, use system font.
  198. ***************
  199. *** 321,327 ****
  200.        * Sixth Commandment for C Programmers.
  201.        */
  202.       Cconws( "\r\nError initializing GEM, hit a key..." );
  203. !     Cconin();
  204.       exit( apid );
  205.       }
  206.   
  207. --- 336,342 ----
  208.        * Sixth Commandment for C Programmers.
  209.        */
  210.       Cconws( "\r\nError initializing GEM, hit a key..." );
  211. !     (void)Cconin();
  212.       exit( apid );
  213.       }
  214.   
  215. *** 1.1    1991/07/03 14:40:46
  216. --- fsmbind.h    1991/07/03 21:05:56
  217. ***************
  218. *** 20,25 ****
  219. --- 20,26 ----
  220.   #define GDOS_FSM  0x5F46534DL    /* '_FSM' */
  221.   #define GDOS_FNT  0x5F464E54L    /* '_FNT' */
  222.   
  223. + #ifndef __GNUC__
  224.   /* Functions
  225.    * ----------------------------------------------------------------------
  226.    */
  227. ***************
  228. *** 67,71 ****
  229. --- 68,75 ----
  230.   VOID    vqt_get_tables __PROTO(( WORD handle, VOIDP *gascii, VOIDP *style ));
  231.   /* Get FSM GASCII tables.
  232.    */
  233. + #else /* __GNUC_ */
  234. + #include <vdibind.h>
  235. + #endif /* __GNUC__ */
  236.   
  237.   #endif FSMBIND_H
  238. *** 1.1    1991/07/03 14:40:46
  239. --- portab.h    1991/07/03 21:05:57
  240. ***************
  241. *** 136,143 ****
  242. --- 136,174 ----
  243.   #endif
  244.   
  245.   typedef signed char    BYTE;        /* Signed 8 bit byte         */
  246. + #if 0
  247. +  /* this is totally wrong: you want to define the user interface to bindings in
  248. +     terms of the natural integer size (which is not necessarily 16 bits wide),
  249. +     and take care of any specific width requirements in the bindings themselves.
  250. +     (ie: dont put the burden of getting the interface type requirements right on
  251. +      the user, but instead take care of it in the bindings).
  252. +     this is particularly important when you are passing WORD pointers (WORD *)
  253. +     to the bindings. If WORD is not defined as the natural integer, most times
  254. +     you will end up with the wrong type of pointer, or the burden will be on
  255. +     the user to define the correct pointer type (this is the worst assumption
  256. +     you can make, and will result in maximum hassels in terms of users bitching
  257. +     or not being able to figure out why their programs dont work). Ansi C compilers
  258. +     will detect the situation, and give warnings of incompatible pointer types,
  259. +     but will not cause an error, thus giving a false sense of security to the users.
  260. +     non-Ansi C will of course not even detect the situation. Plus it is much more
  261. +     natural to write stuff in terms of int, instead of WORD or some interface
  262. +     defined type (think of constants, that will have to be cast, since they cannot
  263. +     be declared to be of a particular type). Also defining WORD as short in a
  264. +     16/32 bit integer compiler will result in widening problems when 32 bit ints
  265. +     are used. If the user misses even one prototype, KBG! (Kiss Baghdad Goodbye :-).
  266. +     i dont even want to think about what would happen with non-prototyping compilers
  267. +     or when gcc -traditional is used, for 32 bit ints.
  268. +     ++jrb
  269. + */
  270.   typedef unsigned short    UWORD;        /* Unsigned 16 bit word        */
  271.   typedef short        WORD;        /* Signed 16 bit word        */
  272. + #else
  273. + typedef unsigned int    UWORD;        /* Unsigned  word        */
  274. + typedef int        WORD;        /* Signed  word            */
  275. + #endif
  276.   typedef unsigned long    ULONG;        /* Unsigned 32 bit long word    */
  277.   typedef signed long    LONG;        /* Signed 32 bit long word    */
  278.   typedef WORD        BOOLEAN;    /* WORD-sized true/false value    */
  279. ***************
  280. *** 185,192 ****
  281.    * ======================================================================
  282.    */
  283.   
  284. ! #define REG    register        /* Register variable        */
  285. ! #define LOCAL    auto            /* Local to function        */
  286.   #define EXTERN    extern            /* Externally defined        */
  287.   #define MLOCAL    static            /* Local to module        */
  288.   #define GLOBAL    /* */            /* Global variable/function    */
  289. --- 216,228 ----
  290.    * ======================================================================
  291.    */
  292.   
  293. ! #ifndef __GNUC__     /* gnuc can do better allocation than humans can */
  294. ! #  define REG            /* Register variable        */
  295. ! #  define LOCAL            /* Local to function        */
  296. ! #else
  297. ! #  define REG    register        /* Register variable        */
  298. ! #  define LOCAL    auto            /* Local to function        */
  299. ! #endif
  300.   #define EXTERN    extern            /* Externally defined        */
  301.   #define MLOCAL    static            /* Local to module        */
  302.   #define GLOBAL    /* */            /* Global variable/function    */
  303. ***************
  304. *** 228,235 ****
  305.    *     values to be passed to exit().
  306.    */
  307.   
  308. ! #define FALSE    0
  309. ! #define TRUE    !0
  310.   #define YES    TRUE
  311.   #define NO    FALSE
  312.   #define SUCCESS TRUE            /* Function success return val    */
  313. --- 264,271 ----
  314.    *     values to be passed to exit().
  315.    */
  316.   
  317. ! #define FALSE    (0)
  318. ! #define TRUE    (!0)
  319.   #define YES    TRUE
  320.   #define NO    FALSE
  321.   #define SUCCESS TRUE            /* Function success return val    */
  322. ***************
  323. *** 239,246 ****
  324.   #define EOF    (-1)            /* EOF Value            */
  325.   #endif
  326.   
  327. ! #ifndef NULL                /* This is defined by ANSI    */
  328. ! #define NULL    ( (VOIDP)0L )
  329.   #endif
  330.   
  331.   #define NULLPTR NULL
  332. --- 275,293 ----
  333.   #define EOF    (-1)            /* EOF Value            */
  334.   #endif
  335.   
  336. ! #ifndef __GNUC__
  337. ! #  ifndef NULL                /* This is defined by ANSI    */
  338. ! #    define NULL    ( (VOIDP)0L )
  339. ! #  endif
  340. ! #else
  341. ! #  ifndef NULL
  342. ! #    ifdef __MSHORT__
  343. ! #      define NULL ((void *)0)
  344. ! #    else
  345. !        /* avoid complaints about misuse of NULL :-)*/
  346. ! #      define NULL (0)
  347. ! #    endif
  348. ! #  endif
  349.   #endif
  350.   
  351.   #define NULLPTR NULL
  352. *** 1.1    1991/07/03 14:40:46
  353. --- pragma.h    1991/07/03 21:05:57
  354. ***************
  355. *** 22,28 ****
  356. --- 22,31 ----
  357.    * GDOS_FNT if FONT GDOS is installed, or
  358.    * some other value (!= -2) if GDOS 1.1 (or G+PLUS or AMCGDOS) is installed.
  359.    */
  360. + #ifndef __GNUC__  /* it is a define in gcc */
  361.   long    vq_vgdos( void );
  362. + #endif
  363.   #if LATTICE
  364.   #pragma inline d0=vq_vgdos() {register d2,a2; "70FE"; "4E42"}
  365.                   /* moveq #-2,d0 / trap #2 */
  366. ***************
  367. *** 55,61 ****
  368.       /* movep.l d0,1(a0) / move.w d2,12(a0) / moveq #73,d0 / trap #2 */
  369.   #endif
  370.   
  371. ! #if __GNUC__
  372.   #define vdicall(a,b,c,d) __vdi__((a),(b))
  373.   #endif
  374.   
  375. --- 58,64 ----
  376.       /* movep.l d0,1(a0) / move.w d2,12(a0) / moveq #73,d0 / trap #2 */
  377.   #endif
  378.   
  379. ! #if 0 /* __GNUC__ */
  380.   #define vdicall(a,b,c,d) __vdi__((a),(b))
  381.   #endif
  382.   
  383. *** 1.1    1991/07/03 14:40:46
  384. --- printout.c    1991/07/03 21:05:57
  385. ***************
  386. *** 37,42 ****
  387. --- 37,43 ----
  388.   #include <aesbind.h>
  389.   #include <gemdefs.h>
  390.   #include <obdefs.h>
  391. + #include <ctype.h>
  392.   #define strupr(s) { short i; for(i=0;s[i];i++) s[i] = toupper(s[i]); }
  393.   #endif
  394.   
  395. *** 1.1    1991/07/03 14:40:46
  396. --- strtol.c    1991/07/03 21:05:59
  397. ***************
  398. *** 1,3 ****
  399. --- 1,8 ----
  400. + /*
  401. +  * kbad: this whole file needs to be replaced
  402. +  *
  403. +  */
  404.   /* ANSI strtol() to replace Lattice lib version 5.04
  405.    * ----------------------------------------------------------------------
  406.    * 901219 kbad MWC update, add strtoul()
  407. *** 1.1    1991/07/03 14:40:46
  408. --- styles.c    1991/07/03 21:05:59
  409. ***************
  410. *** 159,169 ****
  411.   /* FIDO */    { 0,      FxBOLD, FxSKEW, FxBS }
  412.   };
  413.   
  414.   /* Local functions
  415.    * ----------------------------------------------------------------------
  416.    */
  417. - MLOCAL int STDARGS DrawFxobj __PROTO(( PARMBLK *parm ));
  418. - MLOCAL int STDARGS PrintSample __PROTO(( PARMBLK *parm ));
  419.   
  420.   MLOCAL BOOLEAN    FlagFsmFx __PROTO(( Style *ps, BOOLEAN draw ));
  421.   MLOCAL VOID    FixFx __PROTO(( WORD obj, UWORD fx, Style *ps ));
  422. --- 159,170 ----
  423.   /* FIDO */    { 0,      FxBOLD, FxSKEW, FxBS }
  424.   };
  425.   
  426. + EXTERN int STDARGS DrawFxobj __PROTO(( PARMBLK *parm ));
  427. + EXTERN int STDARGS PrintSample __PROTO(( PARMBLK *parm ));
  428.   /* Local functions
  429.    * ----------------------------------------------------------------------
  430.    */
  431.   
  432.   MLOCAL BOOLEAN    FlagFsmFx __PROTO(( Style *ps, BOOLEAN draw ));
  433.   MLOCAL VOID    FixFx __PROTO(( WORD obj, UWORD fx, Style *ps ));
  434. *** 1.1    1991/07/03 14:40:46
  435. --- userdef.c    1991/07/03 21:05:59
  436. ***************
  437. *** 34,39 ****
  438. --- 34,40 ----
  439.   #include <aesbind.h>
  440.   #include <gemdefs.h>
  441.   #include <obdefs.h>
  442. + #include <ctype.h>
  443.   #define strupr(s) { short i; for(i=0;s[i];i++) s[i] = toupper(s[i]); }
  444.   #endif
  445.   
  446.