~ubuntu-branches/ubuntu/lucid/9base/lucid

« back to all changes in this revision

Viewing changes to lib9/fmt.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-20 17:34:06 UTC
  • mfrom: (6.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090820173406-xpwqa9ruyevvc0ut
Tags: 1:3-3
* Updating maintainer field.
* Updating vcs fields.
* Updating package to standards version 3.8.3.
* Updatin variables writing in rules to consistent style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        int     width;
35
35
        int     prec;
36
36
        unsigned long   flags;
 
37
        char    *decimal;       /* decimal point; cannot be "" */
 
38
 
 
39
        /* For %'d */
 
40
        char *thousands;        /* separator for thousands */
 
41
        
 
42
        /* 
 
43
         * Each char is an integer indicating #digits before next separator. Values:
 
44
         *      \xFF: no more grouping (or \x7F; defined to be CHAR_MAX in POSIX)
 
45
         *      \x00: repeat previous indefinitely
 
46
         *      \x**: count that many
 
47
         */
 
48
        char    *grouping;              /* descriptor of separator placement */
37
49
};
38
50
 
39
51
enum{
43
55
        FmtSharp        = FmtPrec << 1,
44
56
        FmtSpace        = FmtSharp << 1,
45
57
        FmtSign         = FmtSpace << 1,
46
 
        FmtZero         = FmtSign << 1,
 
58
        FmtApost                = FmtSign << 1,
 
59
        FmtZero         = FmtApost << 1,
47
60
        FmtUnsigned     = FmtZero << 1,
48
61
        FmtShort        = FmtUnsigned << 1,
49
62
        FmtLong         = FmtShort << 1,
64
77
int             fmtfdflush(Fmt *f);
65
78
int             fmtfdinit(Fmt *f, int fd, char *buf, int size);
66
79
int             fmtinstall(int c, int (*f)(Fmt*));
 
80
int             fmtnullinit(Fmt*);
 
81
void            fmtlocaleinit(Fmt*, char*, char*, char*);
67
82
int             fmtprint(Fmt *f, char *fmt, ...);
68
83
int             fmtrune(Fmt *f, int r);
69
84
int             fmtrunestrcpy(Fmt *f, Rune *s);