2 * Creation Date: <2003/10/18 13:52:32 samuel>
3 * Time-stamp: <2003/10/18 13:54:24 samuel>
9 * Copyright (C) 2003 Samuel Rydh (samuel@ibrium.se)
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
18 #include "libc/string.h"
19 #include "libc/vsprintf.h"
20 #include "libopenbios/bindings.h"
22 /* strncpy without 0-pad */
24 strncpy_nopad( char *dest
, const char *src
, size_t n
)
26 int len
= MIN( n
, strlen(src
)+1 );
27 return memcpy( dest
, src
, len
);
32 int forth_printf( const char *fmt
, ... )
39 i
= vsnprintf(buf
, sizeof(buf
), fmt
, args
);
42 PUSH(pointer2cell(buf
));