Hengband  2.1.4
 全て データ構造 ファイル 関数 変数 型定義 マクロ定義 ページ
z-form.h
説明を見る。
1 /* File z-form.h */
2 
3 /*
4  * Copyright (c) 1997 Ben Harrison
5  *
6  * This software may be copied and distributed for educational, research,
7  * and not for profit purposes provided that this copyright and statement
8  * are included in all such copies.
9  */
10 
11 #ifndef INCLUDED_Z_FORM_H
12 #define INCLUDED_Z_FORM_H
13 
14 #include "h-basic.h"
15 
16 /*
17  * This file provides functions very similar to "sprintf()", but which
18  * not only parse some additional "format sequences", but also enforce
19  * bounds checking, and allow repeated "appends" to the same buffer.
20  *
21  * See "z-form.c" for more detailed information about the routines,
22  * including a list of the legal "format sequences".
23  *
24  * This file makes use of both "z-util.c" and "z-virt.c"
25  */
26 
27 
28 /**** Available Functions ****/
29 
30 /* Format arguments into given bounded-length buffer */
31 extern uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp);
32 
33 /* Simple interface to "vstrnfmt()" */
34 extern uint strnfmt(char *buf, uint max, cptr fmt, ...);
35 
36 /* Simple interface to "vstrnfmt()", assuming infinite length */
37 extern uint strfmt(char *buf, cptr fmt, ...);
38 
39 /* Format arguments into a static resizing buffer */
40 extern char *vformat(cptr fmt, va_list vp);
41 
42 /* Simple interface to "vformat()" */
43 extern char *format(cptr fmt, ...);
44 
45 /* Vararg interface to "plog()", using "format()" */
46 extern void plog_fmt(cptr fmt, ...);
47 
48 /* Vararg interface to "quit()", using "format()" */
49 extern void quit_fmt(cptr fmt, ...);
50 
51 /* Vararg interface to "core()", using "format()" */
52 extern void core_fmt(cptr fmt, ...);
53 
54 
55 #endif
char * buf
Definition: chuukei.c:83
void quit_fmt(cptr fmt,...)
Definition: z-form.c:801
void plog_fmt(cptr fmt,...)
Definition: z-form.c:778
const char * cptr
文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings)
Definition: h-type.h:46
char * format(cptr fmt,...)
Definition: z-form.c:754
uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
Definition: z-form.c:235
char * vformat(cptr fmt, va_list vp)
Definition: z-form.c:661
変愚時追加された基本事項のヘッダーファイル / The most basic "include" file.
uint strfmt(char *buf, cptr fmt,...)
Definition: z-form.c:726
unsigned int uint
Definition: h-type.h:79
uint strnfmt(char *buf, uint max, cptr fmt,...)
Definition: z-form.c:702
void core_fmt(cptr fmt,...)
Definition: z-form.c:824