Annotation of researchv9/jtools/src/pi/format.h, revision 1.1

1.1     ! root        1: #ifndef FORMAT_H
        !             2: #define FORMAT_H
        !             3: #ifndef UNIV_H
        !             4: #include "univ.h"
        !             5: #endif
        !             6: 
        !             7: #define F_EXT8         0x000001
        !             8: #define F_EXT16                0x000002
        !             9: #define F_MASK8                0x000004
        !            10: #define F_MASK16       0x000008
        !            11: #define F_HEX          0x000010
        !            12: #define F_DECIMAL      0x000020
        !            13: #define F_SIGNED       0x000040
        !            14: #define F_OCTAL                0x000080
        !            15: #define F_ASCII                0x000100
        !            16: #define F_FLOAT                0x000200
        !            17: #define F_DOUBLE       0x000400
        !            18: #define F_DBLHEX       0x000800        
        !            19: #define F_SHORTSTRING  0x001000
        !            20: #define F_LONGSTRING   0x002000
        !            21: #define F_SYMBOLIC     0x004000
        !            22: #define F_ENUM         0x008000
        !            23: #define F_UTYPE                0x010000
        !            24: #define F_ARY          0x020000
        !            25: #define F_NONE         0x040000
        !            26: #define F_TURNOFF      0x080000
        !            27: #define F_TIME         0x100000
        !            28: 
        !            29: #define F_STRING       (F_SHORTSTRING|F_LONGSTRING)
        !            30: #define F_MASKEXT8     (F_MASK8|F_EXT8)
        !            31: #define F_MASKEXT16    (F_MASK16|F_EXT16)
        !            32: #define F_MASKEXT816   (F_MASKEXT8|F_MASKEXT16)
        !            33: #define F_HOAD         (F_HEX|F_OCTAL|F_ASCII|F_DECIMAL)
        !            34: 
        !            35: #define TBLS 250
        !            36: class Bls {
        !            37:        char    *p;
        !            38: public:
        !            39:        char    text[TBLS+1];
        !            40:        int     clear()         { *(p=text) = 0; return 1;}     // cfront bug
        !            41:                Bls()           { clear(); }
        !            42:                Bls(char* ...);
        !            43:                Bls(Bls&);
        !            44:        char    *af(char* ...);
        !            45: };
        !            46: 
        !            47: class Format {
        !            48: class  SymTab  *stab;
        !            49:        Bls     accum;
        !            50:        char    *sep;
        !            51:        void    grow(char*);
        !            52:        void    grow(char*, long);
        !            53:        void    grow(char*, double);
        !            54:        void    growtime(long);
        !            55: public:
        !            56:        char    *f(long, double=0.0);
        !            57:                Format(long=0, SymTab* =0);
        !            58:        long    format;
        !            59: };
        !            60: 
        !            61: char *FmtByte(int), *FmtName(int);
        !            62: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.