From 95466298facc09321beffaa0561746f2f014b150 Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Tue, 2 Aug 2022 23:34:06 +0800 Subject: [PATCH] Update bbox_print.cpp --- src/gausskernel/cbb/bbox/bbox_print.cpp | 30 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/gausskernel/cbb/bbox/bbox_print.cpp b/src/gausskernel/cbb/bbox/bbox_print.cpp index cf3c8ea8..95f2cd0e 100644 --- a/src/gausskernel/cbb/bbox/bbox_print.cpp +++ b/src/gausskernel/cbb/bbox/bbox_print.cpp @@ -60,7 +60,7 @@ void bbox_initlog(int iLogScreen) function name: bbox_itoc description: Convert an integer to a character. arguments: An integer needed to be converted. -return value: An character that corresponds to the integer argument. +return value: An character that corresponds to the function's integer argument. note: The integer argument can be converted in radices more than decimalism. date: 2022/8/2 contact tel: 18720816902 @@ -69,17 +69,25 @@ inline char bbox_itoc(u8 sNum) { return (char)((sNum < 10) ? (sNum + 48) : (sNum + 87)); } + /* - * convert int to string - * in : pCallback - call back function - * ptr - private data to call this function - * piCount - offset pointer - * iSize - buffer size - * uNum - the variable to convert - * sSys - type of variable - * isNeg - is negative - * return : need call back - */ +function name: bbox_put_dox +description: Conversion of number systems. +arguments: The first argument pCallback is a pointer to a callback function, we + use it to reverse the final result. The second argument is a pointer of + type void* used as a argument of function pCallback. The third argument + piCount is a pointer of type int, an offset pointer, also be used as a argument + of pCallback. The fourth argument is an integer of 32 bits, it indicates the buffer + size pCallback uses.The fifth argument uNum is a decimal integer that will + be converted to an integer in another radix. The sixth argument is used as + base to conversion of number systems. The last argument indicates the integer + after converted is a negative integer or not. +return value: An integer, indicating if the function pCallback work successfully. +note: The argument uNum should be a positive integer, after conversion of number systems + the sign will be appended to string's tail. +date: 2022/8/2 +contact tel: 18720816902 +*/ s32 bbox_put_dox(BBOX_vnprintCallBack pCallback, void* ptr, s32* piCount, u32 iSize, u64 uNum, s32 sSys, s32 isNeg) { s64 i = 0;