[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_picture.nw



  User: cnieves 
  Date: 05/02/22 15:42:32

  Modified:    .        o_picture.nw
  Log:
  Fix character conversion.
  
   
  
  
  
  
  Revision  Changes    Path
  1.4       +14 -4     eda/geda/devel/libgeda/noweb/o_picture.nw
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.nw
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/noweb/o_picture.nw,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- o_picture.nw	22 Feb 2005 19:53:33 -0000	1.3
  +++ o_picture.nw	22 Feb 2005 20:42:32 -0000	1.4
  @@ -120,6 +120,15 @@
       s_log_message ("Error reading picture definition line: %s.\n", buf);
     }
   
  +  /* Convert from ascii character to number */
  +  if (g_ascii_isdigit(mirrored)) {
  +    mirrored -= 0x30;
  +  }
  +
  +  if (g_ascii_isdigit(embedded)) {
  +    embedded -= 0x30;
  +  }
  +
     if (width == 0 || height == 0) {
       fprintf(stderr, "Found a zero width/height picture [ %c %d %d %d %d ]\n",
               type, x1, y1, width, height);
  @@ -245,12 +254,13 @@
     printf("picture: %d %d %d %d\n", x1, y1, width, height);
   #endif
   
  -  return(g_strdup_printf("%c %d %d %d %d %d %d %d\n%s", 
  +  return(g_strdup_printf("%c %d %d %d %d %d %c %c\n%s", 
   			 object->type,
   			 x1, y1, width, height,
   			 object->picture->angle,
  -			 object->picture->mirrored,
  -			 0, /* No embedded pictures support yet */
  +			 /* Convert the (0,1) chars to ASCII */
  +			 (object->picture->mirrored)+0x30, 
  +			 0+0x30, /* No embedded pictures support yet */
   			 object->picture->filename));