mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
删除了一些信息的打印
This commit is contained in:
@ -26,18 +26,17 @@
|
||||
|
||||
// 定义类型的缩写
|
||||
typedef unsigned long ul;
|
||||
typedef unsigned long long ull;
|
||||
typedef long long ll;
|
||||
typedef unsigned long long int ull;
|
||||
typedef long long int ll;
|
||||
|
||||
#define ABS(x) ((x) > 0 ? (x) : -(x)) // 绝对值
|
||||
#define ABS(x) ((x) > 0 ? (x) : -(x)) // 绝对值
|
||||
|
||||
// 四舍五入成整数
|
||||
ul round(double x)
|
||||
{
|
||||
return (ul)(x+0.5);
|
||||
return (ul)(x + 0.5);
|
||||
}
|
||||
|
||||
|
||||
//链表数据结构
|
||||
struct List
|
||||
{
|
||||
@ -112,11 +111,9 @@ static inline int strlen(char *s)
|
||||
return __res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void *memset(void *dst, unsigned char C, ul Count)
|
||||
{
|
||||
|
||||
|
||||
int d0, d1;
|
||||
unsigned long tmp = C * 0x0101010101010101UL;
|
||||
__asm__ __volatile__("cld \n\t"
|
||||
@ -140,7 +137,7 @@ void *memset(void *dst, unsigned char C, ul Count)
|
||||
void *memset_c(void *dst, unsigned char c, ul n)
|
||||
{
|
||||
unsigned char *s = (unsigned char *)dst;
|
||||
for(int i=0;i<n;++i)
|
||||
for (int i = 0; i < n; ++i)
|
||||
s[i] = c;
|
||||
return dst;
|
||||
}
|
@ -316,7 +316,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
case 'X':
|
||||
//flags |= SPECIAL;
|
||||
if (qualifier == 'l')
|
||||
str = write_num(str, va_arg(args, long long), 16, field_width, precision, flags);
|
||||
str = write_num(str, va_arg(args, ull), 16, field_width, precision, flags);
|
||||
else
|
||||
str = write_num(str, va_arg(args, int), 16, field_width, precision, flags);
|
||||
break;
|
||||
@ -379,7 +379,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
return str - buf;
|
||||
}
|
||||
|
||||
static char *write_num(char *str, long long num, int base, int field_width, int precision, int flags)
|
||||
static char *write_num(char *str, ull num, int base, int field_width, int precision, int flags)
|
||||
{
|
||||
/**
|
||||
* @brief 将数字按照指定的要求转换成对应的字符串
|
||||
|
@ -92,7 +92,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
* @param precision 精度
|
||||
* @param flags 标志位
|
||||
*/
|
||||
static char* write_num(char *str, long long num, int base, int field_width, int precision, int flags);
|
||||
static char* write_num(char *str, ull num, int base, int field_width, int precision, int flags);
|
||||
|
||||
|
||||
static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags);
|
||||
|
Reference in New Issue
Block a user