source: trunk/kernel/libk/sprintk.c @ 192

Last change on this file since 192 was 1, checked in by alain, 7 years ago

First import

File size: 1.8 KB
Line 
1/*
2   This file is part of MutekP.
3 
4   MutekP is free software; you can redistribute it and/or modify it
5   under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8 
9   MutekP is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with MutekP; if not, write to the Free Software Foundation,
16   Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18   UPMC / LIP6 / SOC (c) 2007
19*/
20
21/*
22 * $Log: sprintf.c,v $
23 * Revision 1.1.1.1  2002/02/28 12:58:56  disydent
24   Creation of Disydent CVS Tree
25 * Revision 1.2  2001/11/22 15:07:38  fred
26   Adding the iprintf function that does the formatting, and removes all
27   the old stuff hanging around.
28 * Revision 1.1.1.1  2001/11/19 16:55:47  pwet
29   Changing the CVS tree structure of disydent
30 * Revision 1.2  2001/11/14 12:12:26  fred
31   Modification for the call to printf and friends.
32   This should be reworked over sometime.
33 * Revision 1.1.1.1  2001/07/24 13:31:54  pwet
34   cvs tree of part of disydent
35 * Revision 1.1.1.1  2001/07/20 07:35:57  pwet
36   Embedded software cvs tree
37 * Revision 1.1  2000/07/24 08:16:05  denis
38   First archive of libc
39 * Revision 1.1  1998/09/16 16:11:22  pwet
40   passage a cvs
41 */
42
43
44#include <stdarg.h>
45#include <thread.h>
46#include <cluster.h>
47#include <libk.h>
48
49int sprintk (char *s, char *fmt, ...)
50{
51   va_list ap;
52   int count;
53
54   va_start (ap, fmt);
55
56   count = iprintk (s, current_cid, 1, fmt, ap);
57   *(s + count) = 0;
58
59   va_end (ap);
60
61   return count;
62}
63
Note: See TracBrowser for help on using the repository browser.