Переглянути джерело

API docs to .h

tags/v0.9.3
Michael Brown 19 роки тому
джерело
коміт
8bc4551f5e
2 змінених файлів з 41 додано та 40 видалено
  1. 1
    36
      src/core/vsprintf.c
  2. 40
    4
      src/include/vsprintf.h

+ 1
- 36
src/core/vsprintf.c Переглянути файл

@@ -10,42 +10,7 @@
10 10
 #define SHRT_SHIFT  ((int)((sizeof(unsigned short)*CHAR_BIT) - 4))
11 11
 #define CHAR_SHIFT  ((int)((sizeof(unsigned char)*CHAR_BIT) - 4))
12 12
 
13
-/** @file
14
- *
15
- * printf and friends.
16
- *
17
- * Etherboot's printf() functions understand the following format
18
- * specifiers:
19
- *
20
- *	- Hexadecimal integers
21
- *		- @c %[#]x	- 4 bytes int (8 hex digits, lower case)
22
- *		- @c %[#]X	- 4 bytes int (8 hex digits, upper case)
23
- *		- @c %[#]lx	- 8 bytes long (16 hex digits, lower case)
24
- *		- @c %[#]lX	- 8 bytes long (16 hex digits, upper case)
25
- *		- @c %[#]hx	- 2 bytes int (4 hex digits, lower case)
26
- *		- @c %[#]hX	- 2 bytes int (4 hex digits, upper case)
27
- *		- @c %[#]hhx	- 1 byte int (2 hex digits, lower case)
28
- *		- @c %[#]hhX	- 1 byte int (2 hex digits, upper case)
29
- *		.
30
- *		If the optional # prefix is specified, the output will
31
- *		be prefixed with 0x (or 0X).
32
- *
33
- *	- Other integers
34
- *		- @c %d		- decimal int
35
- *	.
36
- *	Note that any width specification (e.g. the @c 02 in @c %02x)
37
- *	will be accepted but ignored.
38
- *
39
- *	- Strings and characters
40
- *		- @c %c		- char
41
- *		- @c %s		- string
42
- *		- @c %m		- error message text (i.e. strerror(errno))
43
- *
44
- *	- Etherboot-specific specifiers
45
- *		- @c %@		- IP in ddd.ddd.ddd.ddd notation
46
- *		- @c %!		- MAC address in xx:xx:xx:xx:xx:xx notation
47
- *
48
- */
13
+/** @file */
49 14
 
50 15
 /**
51 16
  * Write a formatted string to a buffer.

+ 40
- 4
src/include/vsprintf.h Переглянути файл

@@ -1,10 +1,46 @@
1 1
 #ifndef VSPRINTF_H
2 2
 #define VSPRINTF_H
3 3
 
4
-/*
5
- * Note that we cannot use __attribute__ (( format ( printf, ... ) ))
6
- * to get automatic type checking on arguments, because we use
7
- * non-standard format characters such as "%!" and "%@".
4
+/** @file
5
+ *
6
+ * printf and friends.
7
+ *
8
+ * Etherboot's printf() functions understand the following format
9
+ * specifiers:
10
+ *
11
+ *	- Hexadecimal integers
12
+ *		- @c %[#]x	- 4 bytes int (8 hex digits, lower case)
13
+ *		- @c %[#]X	- 4 bytes int (8 hex digits, upper case)
14
+ *		- @c %[#]lx	- 8 bytes long (16 hex digits, lower case)
15
+ *		- @c %[#]lX	- 8 bytes long (16 hex digits, upper case)
16
+ *		- @c %[#]hx	- 2 bytes int (4 hex digits, lower case)
17
+ *		- @c %[#]hX	- 2 bytes int (4 hex digits, upper case)
18
+ *		- @c %[#]hhx	- 1 byte int (2 hex digits, lower case)
19
+ *		- @c %[#]hhX	- 1 byte int (2 hex digits, upper case)
20
+ *		.
21
+ *		If the optional # prefix is specified, the output will
22
+ *		be prefixed with 0x (or 0X).
23
+ *
24
+ *	- Other integers
25
+ *		- @c %d		- decimal int
26
+ *	.
27
+ *	Note that any width specification (e.g. the @c 02 in @c %02x)
28
+ *	will be accepted but ignored.
29
+ *
30
+ *	- Strings and characters
31
+ *		- @c %c		- char
32
+ *		- @c %s		- string
33
+ *		- @c %m		- error message text (i.e. strerror(errno))
34
+ *
35
+ *	- Etherboot-specific specifiers
36
+ *		- @c %@		- IP address in ddd.ddd.ddd.ddd notation
37
+ *		- @c %!		- MAC address in xx:xx:xx:xx:xx:xx notation
38
+ *
39
+ *
40
+ * @note Unfortunately, we cannot use <tt> __attribute__ (( format (
41
+ * printf, ... ) )) </tt> to get automatic type checking on arguments,
42
+ * because we use non-standard format characters such as @c %! and
43
+ * @c %@.
8 44
  *
9 45
  */
10 46
 

Завантаження…
Відмінити
Зберегти