summaryrefslogtreecommitdiff
path: root/minix/lib/libsys/kputs.c
blob: e05c9bf45887532ec38740247ccb21ee2cce2784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* system services puts()
 *
 * This is here because gcc converts printf() calls without actual formatting
 * in the format string, to puts() calls. While that "feature" can be disabled
 * with the -fno-builtin-printf gcc flag, we still don't want the resulting
 * mayhem to occur in system servers even when that flag is forgotten.
 */

#include <stdio.h>

/* puts() uses kputc() to print characters. */
void kputc(int c);

int puts(const char *s)
{

	for (; *s; s++)
		kputc(*s);

	kputc('\n');
	kputc('\0');

	return 0;
}