mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
Move vsprintf functions into their own header
common.h is very large, so before changing the vsprintf functions, move the prototypes into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a7b3918533
commit
9785c905cf
2 changed files with 40 additions and 10 deletions
|
@ -733,16 +733,7 @@ void uuid_str_to_bin(const char *uuid, unsigned char *out);
|
|||
int uuid_str_valid(const char *uuid);
|
||||
|
||||
/* lib/vsprintf.c */
|
||||
ulong simple_strtoul(const char *cp,char **endp,unsigned int base);
|
||||
int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
|
||||
unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base);
|
||||
long simple_strtol(const char *cp,char **endp,unsigned int base);
|
||||
void panic(const char *fmt, ...)
|
||||
__attribute__ ((format (__printf__, 1, 2), noreturn));
|
||||
int sprintf(char * buf, const char *fmt, ...)
|
||||
__attribute__ ((format (__printf__, 2, 3)));
|
||||
int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
char *simple_itoa(ulong i);
|
||||
#include <vsprintf.h>
|
||||
|
||||
/* lib/strmhz.c */
|
||||
char * strmhz(char *buf, unsigned long hz);
|
||||
|
|
39
include/vsprintf.h
Normal file
39
include/vsprintf.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __VSPRINTF_H
|
||||
#define __VSPRINTF_H
|
||||
|
||||
ulong simple_strtoul(const char *cp, char **endp, unsigned int base);
|
||||
int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
|
||||
unsigned long long simple_strtoull(const char *cp, char **endp,
|
||||
unsigned int base);
|
||||
long simple_strtol(const char *cp, char **endp, unsigned int base);
|
||||
void panic(const char *fmt, ...)
|
||||
__attribute__ ((format (__printf__, 1, 2), noreturn));
|
||||
int sprintf(char *buf, const char *fmt, ...)
|
||||
__attribute__ ((format (__printf__, 2, 3)));
|
||||
int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
char *simple_itoa(ulong i);
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue