-
Notifications
You must be signed in to change notification settings - Fork 0
/
fmt.h
34 lines (33 loc) · 1.25 KB
/
fmt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef FMT_INCLUDED
#define FMT_INCLUDED
#include <stdio.h>
#include <stdarg.h>
#include "except.h"
#define T Fmt_T
typedef void (*T)(int code, va_list *app,
int put(int c, void *cl), void *cl,
unsigned char flags[256], int width, int precision);
extern char *Fmt_flags;
extern const Except_T Fmt_Overflow;
extern void Fmt_fmt(int put(int c, void *cl), void *cl,
const char *fmt, ...);
extern void Fmt_vfmt(int put(int c, void *cl), void *cl,
const char *fmt, va_list ap);
extern void Fmt_print(const char *fmt, ...);
extern void Fmt_fprint(FILE *stream,
const char *fmt, ...);
extern int Fmt_sfmt(char *buf, int size,
const char *fmt, ...);
extern int Fmt_vsfmt(char *buf, int size,
const char *fmt, va_list ap);
extern char *Fmt_string(const char *fmt, ...);
extern char *Fmt_vstring(const char *fmt, va_list ap);
extern T Fmt_register(int code, T cvt);
extern void Fmt_putd(const char *str, int len,
int put(int c, void *cl), void *cl,
unsigned char flags[256], int width, int precision);
extern void Fmt_puts(const char *str, int len,
int put(int c, void *cl), void *cl,
unsigned char flags[256], int width, int precision);
#undef T
#endif