Skip to content
Snippets Groups Projects
Commit de8ff3ff authored by Marcus Comstedt's avatar Marcus Comstedt
Browse files

Minor omptimization in printing negative numbers...

Rev: src/modules/sprintf/sprintf.c:1.55
parent ad50fc2e
No related branches found
No related tags found
No related merge requests found
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
*/ */
#include "global.h" #include "global.h"
RCSID("$Id: sprintf.c,v 1.54 1999/10/26 15:34:33 marcus Exp $"); RCSID("$Id: sprintf.c,v 1.55 1999/10/26 15:55:51 marcus Exp $");
#include "error.h" #include "error.h"
#include "array.h" #include "array.h"
#include "svalue.h" #include "svalue.h"
...@@ -1127,7 +1127,7 @@ static void low_pike_sprintf(struct format_stack *fs, ...@@ -1127,7 +1127,7 @@ static void low_pike_sprintf(struct format_stack *fs,
if((*p++ = '0'|(val&((1<<base)-1)))>'9') if((*p++ = '0'|(val&((1<<base)-1)))>'9')
p[-1] += (mode=='X'? 'A'-'9'-1 : 'a'-'9'-1); p[-1] += (mode=='X'? 'A'-'9'-1 : 'a'-'9'-1);
val = ((unsigned INT_TYPE)val) >> base; val = ((unsigned INT_TYPE)val) >> base;
} while(--mask_size && val); } while(val);
l = p-x-1; l = p-x-1;
} }
*p = '\0'; *p = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment