/[pspp]/pspp/src/format.c
ViewVC logotype

Diff of /pspp/src/format.c

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

revision 1.13 by blp, Mon May 16 07:33:17 2005 UTC revision 1.14 by blp, Tue May 17 05:46:39 2005 UTC
# Line 37  struct fmt_desc formats[FMT_NUMBER_OF_FO Line 37  struct fmt_desc formats[FMT_NUMBER_OF_FO
37    {"",         -1, -1,  -1, -1,   -1, 0000, -1, -1},    {"",         -1, -1,  -1, -1,   -1, 0000, -1, -1},
38  };  };
39    
40    /* Common formats. */
41    const struct fmt_spec f8_2 = {FMT_F, 8, 2};
42    
43  /* Parses the alphabetic prefix of the current token as a format  /* Parses the alphabetic prefix of the current token as a format
44     specifier name.  Returns the corresponding format specifier     specifier name.  Returns the corresponding format specifier
45     type if successful, or -1 on failure.  If ALLOW_XT is zero,     type if successful, or -1 on failure.  If ALLOW_XT is zero,
# Line 442  translate_fmt (int spss) Line 445  translate_fmt (int spss)
445        return type;        return type;
446    return -1;    return -1;
447  }  }
448    
449    /* Returns an input format specification with type TYPE, width W,
450       and D decimals. */
451    struct fmt_spec
452    make_input_format (int type, int w, int d)
453    {
454      struct fmt_spec f;
455      f.type = type;
456      f.w = w;
457      f.d = d;
458      assert (check_input_specifier (&f, 0));
459      return f;
460    }
461    
462    /* Returns an output format specification with type TYPE, width
463       W, and D decimals. */
464    struct fmt_spec
465    make_output_format (int type, int w, int d)
466    {
467      struct fmt_spec f;
468      f.type = type;
469      f.w = w;
470      f.d = d;
471      assert (check_output_specifier (&f, 0));
472      return f;
473    }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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