Rev 300 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 300 | Rev 324 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | static char *roundl(long double fract, int *expv, char *start, char *end, |
70 | static char *roundl(long double fract, int *expv, char *start, char *end, |
71 | char ch, char *signp); |
71 | char ch, char *signp); |
72 | static char *exponentl(char *p, int expv, unsigned char fmtch); |
72 | static char *exponentl(char *p, int expv, unsigned char fmtch); |
Line 73... | Line 73... | ||
73 | 73 | ||
- | 74 | static char NULL_REP[] = "(null)"; |
|
Line 74... | Line 75... | ||
74 | static char NULL_REP[] = "(null)"; |
75 | static char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ |
75 | 76 | ||
76 | int _doprnt(char *dest, size_t maxlen, const char *fmt0, va_list argp) |
77 | int _doprnt(char *dest, size_t maxlen, const char *fmt0, va_list argp) |
77 | { |
78 | { |
Line 93... | Line 94... | ||
93 | int size; /* size of converted field or string */ |
94 | int size; /* size of converted field or string */ |
94 | int width; /* width from format (%8d), or 0 */ |
95 | int width; /* width from format (%8d), or 0 */ |
95 | char sign; /* sign prefix (' ', '+', '-', or \0) */ |
96 | char sign; /* sign prefix (' ', '+', '-', or \0) */ |
96 | char softsign; /* temporary negative sign for floats */ |
97 | char softsign; /* temporary negative sign for floats */ |
97 | const char *digs; /* digits for [diouxX] conversion */ |
98 | const char *digs; /* digits for [diouxX] conversion */ |
98 | char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ |
- | |
99 | char *p; |
99 | char *p; |
- | 100 | digs = "0123456789abcdef"; |
|
Line 100... | Line 101... | ||
100 | 101 | ||
101 | fmt = fmt0; |
- | |
102 | digs = "0123456789abcdef"; |
102 | fmt = fmt0; |
Line 103... | Line 103... | ||
103 | p = dest; |
103 | p = dest; |
104 | 104 | ||
105 | for (cnt = 0;; ++fmt) |
105 | for (cnt = 0;; ++fmt) |
Line 750... | Line 750... | ||
750 | else |
750 | else |
751 | (void)strcpy(bufp, "Inf"); |
751 | (void)strcpy(bufp, "Inf"); |
752 | return(3); |
752 | return(3); |
753 | }>>=>>>=>>>>>>>>>>>>>=0)>='0')> |
753 | } |
Line -... | Line 754... | ||
- | 754 | ||
- | 755 | static unsigned int strlen(const char* string) |
|
- | 756 | { |
|
- | 757 | int i; |
|
- | 758 | i=0; |
|
- | 759 | while (*string++) i++; |
|
- | 760 | return i; |
|
Line -... | Line 761... | ||
- | 761 | } |
|
- | 762 | ||
- | 763 | static char* strcpy(char* dst,const char* src) |
|
- | 764 | { |
|
- | 765 | char* res= dst; |
|
- | 766 | while(*dst++ = *src++) ; |