Commit 73c4f828 authored by Zhang Jiaming's avatar Zhang Jiaming Committed by Matt Turner

alpha: Add some spaces to ensure format specification

Add a space after ','.
Add spaces around the '=', '>' and '=='.
Signed-off-by: default avatarZhang Jiaming <jiaming@nfschina.com>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent d6e59579
...@@ -42,8 +42,8 @@ static int skip_atoi(const char **s) ...@@ -42,8 +42,8 @@ static int skip_atoi(const char **s)
static char * number(char * str, unsigned long long num, int base, int size, int precision, int type) static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)
{ {
char c,sign,tmp[66]; char c, sign, tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
int i; int i;
if (type & LARGE) if (type & LARGE)
...@@ -83,14 +83,14 @@ static char * number(char * str, unsigned long long num, int base, int size, int ...@@ -83,14 +83,14 @@ static char * number(char * str, unsigned long long num, int base, int size, int
precision = i; precision = i;
size -= precision; size -= precision;
if (!(type&(ZEROPAD+LEFT))) if (!(type&(ZEROPAD+LEFT)))
while(size-->0) while (size-- > 0)
*str++ = ' '; *str++ = ' ';
if (sign) if (sign)
*str++ = sign; *str++ = sign;
if (type & SPECIAL) { if (type & SPECIAL) {
if (base==8) if (base==8)
*str++ = '0'; *str++ = '0';
else if (base==16) { else if (base == 16) {
*str++ = '0'; *str++ = '0';
*str++ = digits[33]; *str++ = digits[33];
} }
...@@ -125,7 +125,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -125,7 +125,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
/* 'z' changed to 'Z' --davidm 1/25/99 */ /* 'z' changed to 'Z' --davidm 1/25/99 */
for (str=buf ; *fmt ; ++fmt) { for (str = buf ; *fmt ; ++fmt) {
if (*fmt != '%') { if (*fmt != '%') {
*str++ = *fmt; *str++ = *fmt;
continue; continue;
...@@ -296,7 +296,7 @@ int sprintf(char * buf, const char *fmt, ...) ...@@ -296,7 +296,7 @@ int sprintf(char * buf, const char *fmt, ...)
int i; int i;
va_start(args, fmt); va_start(args, fmt);
i=vsprintf(buf,fmt,args); i = vsprintf(buf, fmt, args);
va_end(args); va_end(args);
return i; return i;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment