History log of /openbsd-current/sys/lib/libsa/printf.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 11-May-2019 deraadt

we have never built without %b support


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.28 17-Jan-2018 patrick

Implement basic padding support in libsa so we can do zero-padding
in bootloader printfs.

Feedback from and ok gerhard@


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.27 14-Jun-2015 miod

Fix 1.26; kdoprnt() should not attempt to invoke va_end() at all, it's the
caller's responsibility to do so.


# 1.26 10-Mar-2015 miod

Invoke va_end() before returning, rather than in an unreachable place; mickey@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.25 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.24 18-Sep-2006 mpf

Add a hand rolled 64bit hex printf that can be used outside of
LIBSA_LONGLONG_PRINTF which requires 64bit math support.
With help from mickey@
Tested on i386, amd64 and on alpha by mickey@
OK mickey@, miod@, deraadt@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.23 22-Sep-2004 miod

Add code to let 32bit code *printf() {u,}int64_t values.
Only enabled if libsa is compiled with the adequate define, so as not to
grow bootblocks which do not need this feature.

ok deraadt@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.22 03-Jan-2004 espie

put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macros
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.


Revision tags: OPENBSD_3_4_BASE
# 1.21 11-Aug-2003 deraadt

ansification and knf and protos


# 1.20 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.19 01-Jun-2003 deraadt

strcpy/strcat/sprintf removal in all bootblocks. various testing by
various people. outside of some messy things in src/gnu, only one
thing in the main tree now violates this rule: bind


# 1.18 20-May-2003 jason

de-register; ok millert


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.17 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.16 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.15 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE SMP_BASE UBC_BASE kame_19991208
# 1.14 16-Aug-1999 downsj

branches: 1.14.4; 1.14.14;
Allow the twiddler to be disabled via a global.


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 12-Jun-1998 d

fix potential bug where sprintf and %p would write to console


# 1.12 18-Apr-1998 deraadt

cannot grow this as mickey wants


Revision tags: OPENBSD_2_3_BASE
# 1.11 18-Apr-1998 deraadt

branches: 1.11.2;
i386 bootblocks that work for 2.3. A tale too long to tell


Revision tags: OPENBSD_2_2_BASE
# 1.10 25-Jul-1997 mickey

userland bye-bye
(arch/machine/libsa have to have machine link or smth)


Revision tags: OPENBSD_2_1_BASE
# 1.9 06-Feb-1997 mickey

print 0x for %p


# 1.8 06-Feb-1997 mickey

better heuristic for %p:
assume l for x only if sizeof(void *)==sizeof(u_long), else it's u_int (;


# 1.7 06-Feb-1997 mickey

remove net/zlib.c (use -lz now)
export NO_NET and SA_ZLIB to the Makefile (from Makefile.inc)
add -p printf flag (tiny code) just for gcc -Wall
import latest alloc.c from netbsd
text data bss dec hex
400 8 0 408 198


# 1.6 08-Dec-1996 niklas

Merge to NetBSD 961207


# 1.5 29-Oct-1996 mickey

move vars closer to the usage.
strip a bit for xxboot/bootxx.


# 1.4 24-Oct-1996 mickey

fix protos and decls.


Revision tags: OPENBSD_2_0_BASE
# 1.3 20-Sep-1996 mickey

fix makefiles. cleanup, addopt for boot.


# 1.2 29-Feb-1996 niklas

From NetBSD: Merge with NetBSD 960217


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.28 17-Jan-2018 patrick

Implement basic padding support in libsa so we can do zero-padding
in bootloader printfs.

Feedback from and ok gerhard@


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.27 14-Jun-2015 miod

Fix 1.26; kdoprnt() should not attempt to invoke va_end() at all, it's the
caller's responsibility to do so.


# 1.26 10-Mar-2015 miod

Invoke va_end() before returning, rather than in an unreachable place; mickey@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.25 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.24 18-Sep-2006 mpf

Add a hand rolled 64bit hex printf that can be used outside of
LIBSA_LONGLONG_PRINTF which requires 64bit math support.
With help from mickey@
Tested on i386, amd64 and on alpha by mickey@
OK mickey@, miod@, deraadt@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.23 22-Sep-2004 miod

Add code to let 32bit code *printf() {u,}int64_t values.
Only enabled if libsa is compiled with the adequate define, so as not to
grow bootblocks which do not need this feature.

ok deraadt@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.22 03-Jan-2004 espie

put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macros
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.


Revision tags: OPENBSD_3_4_BASE
# 1.21 11-Aug-2003 deraadt

ansification and knf and protos


# 1.20 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.19 01-Jun-2003 deraadt

strcpy/strcat/sprintf removal in all bootblocks. various testing by
various people. outside of some messy things in src/gnu, only one
thing in the main tree now violates this rule: bind


# 1.18 20-May-2003 jason

de-register; ok millert


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.17 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.16 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.15 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE SMP_BASE UBC_BASE kame_19991208
# 1.14 16-Aug-1999 downsj

branches: 1.14.4; 1.14.14;
Allow the twiddler to be disabled via a global.


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.13 12-Jun-1998 d

fix potential bug where sprintf and %p would write to console


# 1.12 18-Apr-1998 deraadt

cannot grow this as mickey wants


Revision tags: OPENBSD_2_3_BASE
# 1.11 18-Apr-1998 deraadt

branches: 1.11.2;
i386 bootblocks that work for 2.3. A tale too long to tell


Revision tags: OPENBSD_2_2_BASE
# 1.10 25-Jul-1997 mickey

userland bye-bye
(arch/machine/libsa have to have machine link or smth)


Revision tags: OPENBSD_2_1_BASE
# 1.9 06-Feb-1997 mickey

print 0x for %p


# 1.8 06-Feb-1997 mickey

better heuristic for %p:
assume l for x only if sizeof(void *)==sizeof(u_long), else it's u_int (;


# 1.7 06-Feb-1997 mickey

remove net/zlib.c (use -lz now)
export NO_NET and SA_ZLIB to the Makefile (from Makefile.inc)
add -p printf flag (tiny code) just for gcc -Wall
import latest alloc.c from netbsd
text data bss dec hex
400 8 0 408 198


# 1.6 08-Dec-1996 niklas

Merge to NetBSD 961207


# 1.5 29-Oct-1996 mickey

move vars closer to the usage.
strip a bit for xxboot/bootxx.


# 1.4 24-Oct-1996 mickey

fix protos and decls.


Revision tags: OPENBSD_2_0_BASE
# 1.3 20-Sep-1996 mickey

fix makefiles. cleanup, addopt for boot.


# 1.2 29-Feb-1996 niklas

From NetBSD: Merge with NetBSD 960217


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision