/[giftcurs]/giFTcurs/src/parse.c
ViewVC logotype

Diff of /giFTcurs/src/parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.159 by weinholt, Fri Apr 30 05:40:14 2004 UTC revision 1.160 by weinholt, Thu Nov 4 14:59:23 2004 UTC
# Line 294  void wrap_lines(list *result, const char Line 294  void wrap_lines(list *result, const char
294          }          }
295  }  }
296    
 void bitmap_set(guchar *bitmap, guint size, guint idx, gboolean value)  
 {  
         if (value)  
                 bitmap[idx >> 3] |= 1 << (idx & 7);  
         else  
                 bitmap[idx >> 3] &= ~(1 << (idx & 7));  
 }  
   
 gboolean bitmap_get(guchar *bitmap, guint size, guint idx)  
 {  
         return bitmap[idx >> 3] & (1 << (idx & 7));  
 }  
   
 gint bitmap_find_unset(guchar *bitmap, guint size)  
 {  
         int i;  
   
         for (i = 0; i < size; i++)  
                 if (bitmap[i] != 0xff)  
                         return (i << 3) + g_bit_nth_lsf(~bitmap[i], -1);  
   
         return -1;  
 }  
   
297  char *convert_to_locale(char *str)  char *convert_to_locale(char *str)
298  {  {
299          const char *from, *to;          const char *from, *to;

Legend:
Removed from v.1.159  
changed lines
  Added in v.1.160

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26