snprintf.c
Source contains lowercase hexadecimal alphabetCalls a character-class helper
SHA-2561dff96f99bf80f1c6b30f398500c79b7e2cba376df3ac38b07022bda2e3994dc
MaleculeO(Er)H(Db₂)
Evidence
3:53… ).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must r …
30:47… VISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <config.h>
35#include <stdio.h>
36#include <stdarg.h>
37#include <stdlib.h>
38#include <string.h>
39#include <ctype.h>
40#include "roken.h"
41#include <assert.h>
42
43enum format_flags {
44 minus_flag = 1,
45 plus_flag = 2,
46 space_flag = 4, …
143:34… lags, int minusp)
144{
145 int len = 0;
146 u_longest n = num;
147 char nstr[64]; /* enough for <192 bit octal integers */
148 int nstart, nlen;
149 char signchar;
150
151 /* given precision, ignore zero flag …
385:39… & zero_flag))
386 flags ^= zero_flag;
387
388 /* width */
389 if (isdigit(c))
390 do {
391 width = width * 10 + c - '0';
⋯4 lines
485:20… arg, ap, unsigned);
486
487 len += append_number (state, arg, 0x10, "0123456789abcdef",
488 width, prec, flags, 0);
489 break;
⋯6 lines