/[pspp]/pspp/src/data-out.c
ViewVC logotype

Diff of /pspp/src/data-out.c

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

revision 1.19 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.20 by jmd, Sat Nov 26 22:49:57 2005 UTC
# Line 56  static string_converter convert_A, conve Line 56  static string_converter convert_A, conve
56  /* Converts binary value V into printable form in the exactly  /* Converts binary value V into printable form in the exactly
57     FP->W character in buffer S according to format specification     FP->W character in buffer S according to format specification
58     FP.  No null terminator is appended to the buffer.  */     FP.  No null terminator is appended to the buffer.  */
59  void  bool
60  data_out (char *s, const struct fmt_spec *fp, const union value *v)  data_out (char *s, const struct fmt_spec *fp, const union value *v)
61  {  {
62    int cat = formats[fp->type].cat;    int cat = formats[fp->type].cat;
# Line 73  data_out (char *s, const struct fmt_spec Line 73  data_out (char *s, const struct fmt_spec
73          {          {
74            memset (s, ' ', fp->w);            memset (s, ' ', fp->w);
75            s[fp->w - fp->d - 1] = '.';            s[fp->w - fp->d - 1] = '.';
76            return;            return true;
77          }          }
78    
79        /* Handle decimal shift. */        /* Handle decimal shift. */
# Line 189  data_out (char *s, const struct fmt_spec Line 189  data_out (char *s, const struct fmt_spec
189    /* Error handling. */    /* Error handling. */
190    if (!ok)    if (!ok)
191      strncpy (s, "ERROR", fp->w);      strncpy (s, "ERROR", fp->w);
192      
193      return ok;
194  }  }
195    
196  /* Converts V into S in F format with width W and D decimal places,  /* Converts V into S in F format with width W and D decimal places,

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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