__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**************************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 2002 Institut National de Recherche en Informatique et */
/* en Automatique. */
/* */
/* All rights reserved. This file is distributed under the terms of */
/* the GNU Lesser General Public License version 2.1, with the */
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/
/* printf-like formatting of 64-bit integers, in case the C library
printf() function does not support them. */
#ifndef CAML_INT64_FORMAT_H
#define CAML_INT64_FORMAT_H
#ifdef CAML_INTERNALS
static void I64_format(char * buffer, char * fmt, int64_t x)
{
static char conv_lower[] = "0123456789abcdef";
static char conv_upper[] = "0123456789ABCDEF";
char rawbuffer[24];
char justify, signstyle, filler, alternate, signedconv;
int base, width, sign, i, rawlen;
char * cvtbl;
char * p, * r;
int64_t wbase, digit;
/* Parsing of format */
justify = '+';
signstyle = '-';
filler = ' ';
alternate = 0;
base = 0;
signedconv = 0;
width = 0;
cvtbl = conv_lower;
for (p = fmt; *p != 0; p++) {
switch (*p) {
case '-':
justify = '-'; break;
case '+': case ' ':
signstyle = *p; break;
case '0':
filler = '0'; break;
case '#':
alternate = 1; break;
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':
width = atoi(p);
while (p[1] >= '0' && p[1] <= '9') p++;
break;
case 'd': case 'i':
signedconv = 1; /* fallthrough */
case 'u':
base = 10; break;
case 'x':
base = 16; break;
case 'X':
base = 16; cvtbl = conv_upper; break;
case 'o':
base = 8; break;
}
}
if (base == 0) { buffer[0] = 0; return; }
/* Do the conversion */
sign = 1;
if (signedconv && I64_is_negative(x)) { sign = -1; x = I64_neg(x); }
r = rawbuffer + sizeof(rawbuffer);
wbase = I64_of_int32(base);
do {
I64_udivmod(x, wbase, &x, &digit);
*--r = cvtbl[I64_to_int32(digit)];
} while (! I64_is_zero(x));
rawlen = rawbuffer + sizeof(rawbuffer) - r;
/* Adjust rawlen to reflect additional chars (sign, etc) */
if (signedconv && (sign < 0 || signstyle != '-')) rawlen++;
if (alternate) {
if (base == 8) rawlen += 1;
if (base == 16) rawlen += 2;
}
/* Do the formatting */
p = buffer;
if (justify == '+' && filler == ' ') {
for (i = rawlen; i < width; i++) *p++ = ' ';
}
if (signedconv) {
if (sign < 0) *p++ = '-';
else if (signstyle != '-') *p++ = signstyle;
}
if (alternate && base == 8) *p++ = '0';
if (alternate && base == 16) { *p++ = '0'; *p++ = 'x'; }
if (justify == '+' && filler == '0') {
for (i = rawlen; i < width; i++) *p++ = '0';
}
while (r < rawbuffer + sizeof(rawbuffer)) *p++ = *r++;
if (justify == '-') {
for (i = rawlen; i < width; i++) *p++ = ' ';
}
*p = 0;
}
#endif /* CAML_INTERNALS */
#endif /* CAML_INT64_FORMAT_H */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| address_class.h | File | 3.22 KB | 0644 |
|
| alloc.h | File | 3.27 KB | 0644 |
|
| backtrace.h | File | 5.42 KB | 0644 |
|
| backtrace_prim.h | File | 3.53 KB | 0644 |
|
| bigarray.h | File | 4.75 KB | 0644 |
|
| callback.h | File | 2.41 KB | 0644 |
|
| compact.h | File | 1.34 KB | 0644 |
|
| compare.h | File | 1.22 KB | 0644 |
|
| compatibility.h | File | 12.92 KB | 0644 |
|
| config.h | File | 7.75 KB | 0644 |
|
| custom.h | File | 2.65 KB | 0644 |
|
| debugger.h | File | 4.95 KB | 0644 |
|
| dynlink.h | File | 1.87 KB | 0644 |
|
| exec.h | File | 2.39 KB | 0644 |
|
| fail.h | File | 3.86 KB | 0644 |
|
| finalise.h | File | 1.6 KB | 0644 |
|
| fix_code.h | File | 1.79 KB | 0644 |
|
| freelist.h | File | 1.56 KB | 0644 |
|
| gc.h | File | 3.45 KB | 0644 |
|
| gc_ctrl.h | File | 2.04 KB | 0644 |
|
| globroots.h | File | 1.37 KB | 0644 |
|
| hash.h | File | 1.64 KB | 0644 |
|
| hooks.h | File | 1.48 KB | 0644 |
|
| instrtrace.h | File | 1.51 KB | 0644 |
|
| instruct.h | File | 2.77 KB | 0644 |
|
| int64_emul.h | File | 6.77 KB | 0644 |
|
| int64_format.h | File | 3.57 KB | 0644 |
|
| int64_native.h | File | 2.98 KB | 0644 |
|
| interp.h | File | 1.57 KB | 0644 |
|
| intext.h | File | 7.79 KB | 0644 |
|
| io.h | File | 5.02 KB | 0644 |
|
| jumptbl.h | File | 2.39 KB | 0644 |
|
| major_gc.h | File | 3.31 KB | 0644 |
|
| md5.h | File | 1.96 KB | 0644 |
|
| memory.h | File | 17.13 KB | 0644 |
|
| minor_gc.h | File | 4.36 KB | 0644 |
|
| misc.h | File | 14.2 KB | 0644 |
|
| mlvalues.h | File | 12.23 KB | 0644 |
|
| osdeps.h | File | 4.37 KB | 0644 |
|
| prims.h | File | 1.57 KB | 0644 |
|
| printexc.h | File | 1.37 KB | 0644 |
|
| reverse.h | File | 5.65 KB | 0644 |
|
| roots.h | File | 1.92 KB | 0644 |
|
| signals.h | File | 2.32 KB | 0644 |
|
| signals_machdep.h | File | 2.47 KB | 0644 |
|
| socketaddr.h | File | 2.16 KB | 0644 |
|
| spacetime.h | File | 8.37 KB | 0644 |
|
| stack.h | File | 4.53 KB | 0644 |
|
| stacks.h | File | 1.79 KB | 0644 |
|
| startup.h | File | 2.12 KB | 0644 |
|
| startup_aux.h | File | 1.6 KB | 0644 |
|
| sys.h | File | 1.63 KB | 0644 |
|
| threads.h | File | 3.12 KB | 0644 |
|
| ui.h | File | 1.44 KB | 0644 |
|
| unixsupport.h | File | 1.95 KB | 0644 |
|
| version.h | File | 193 B | 0644 |
|
| weak.h | File | 3.05 KB | 0644 |
|