0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-19 20:05:21 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Martin Mares
30b773041c IP address formatting now uses the same rules as formatting of strings
with two exceptions:

   o  Any non-zero field width is automatically replaced by standard
      IP address width. This hides dependences on IPv4/IPv6.
   o  %#I generates hexadecimal form of the address.

Therefore |%I| generates unpadded format, |%1I| full size flush-right,
and |%-1I| full size flush-left format.
2001-08-19 11:11:44 +00:00
Martin Mares
7722938d63 Added library progdocs. 2000-06-04 18:34:39 +00:00
Martin Mares
53943a0022 Defined format specifier %M' which behaves as %m', but takes the
error code as an argument.

Use it in socket hooks where we really shouldn't rely on errno containing
the right value or even existing.
2000-05-02 16:10:04 +00:00
Martin Mares
221135d6bf Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.
2000-03-31 23:30:21 +00:00
Martin Mares
4254dc45e7 Killed bug in processing of 'h' prefix. Patch taken from linux-2.1.129. 1998-11-21 10:25:34 +00:00
Martin Mares
53a416d376 Implemented snprintf and similar functions. It took a lot of thinking,
but the modifications were relatively simple and straightforward.
1998-11-16 21:40:35 +00:00
Martin Mares
d997534f65 Oops, forgot '%m'... 1998-06-17 14:34:13 +00:00
Martin Mares
ecacdfa434 Added local version of sprintf (bsprintf and bvsprintf) offering few new
format strings:

	%I	IP address
	%#I	IP address in hexadecimal
	%1I	IP address padded to full length
	%m	strerror(errno)
1998-06-17 14:31:36 +00:00