]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/gen/gen.c
ncurses 6.0 - patch 20170225
[ncurses.git] / Ada95 / gen / gen.c
index 3d4596f7278101614282a360ada7521921fc2f8f..fd759ba45a41d5755f346f430372628915fae858 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2016 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
 
 /*
     Version Control
-    $Id: gen.c,v 1.68 2014/05/24 21:34:53 tom Exp $
+    $Id: gen.c,v 1.70 2016/02/13 22:00:22 tom Exp $
   --------------------------------------------------------------------------*/
 /*
   This program prints on its standard output the source for the
@@ -108,7 +108,7 @@ bit_is_set(const UCHAR * const data,
   else                         /* or */
     bit = ~offset;             /* 7 - offset */
   bit &= 7;                    /* modulo 8 */
-  return byte & (UCHAR) (1 << bit);
+  return (UCHAR) (byte & (1 << bit));
 }
 
 /* Find lowest and highest used offset in a byte array. */
@@ -153,7 +153,7 @@ find_pos(const UCHAR * const data,
     UINT first, last;                                                   \
     record mask;                                                        \
     memset (&mask, 0, sizeof (mask));                                   \
-    mask.field = -1;                                                    \
+    memset (&mask.field, 0xff, sizeof(mask.field));                     \
     if (!find_pos ((UCHAR *)&mask, sizeof (mask), &first, &last))       \
       my_error ("failed to locate" #record "_" #field);                 \
     print_constant (#record "_" #field "_First", first);                \