003 File Manager
Current Path:
/usr/src/usr.bin/getconf
usr
/
src
/
usr.bin
/
getconf
/
📁
..
📄
Makefile
(1.1 KB)
📄
Makefile.depend
(273 B)
📄
confstr.gperf
(2.44 KB)
📄
fake-gperf.awk
(1.38 KB)
📄
getconf.1
(5.79 KB)
📄
getconf.c
(6.12 KB)
📄
getconf.h
(2.08 KB)
📄
limits.gperf
(3.03 KB)
📄
pathconf.gperf
(1.79 KB)
📄
progenv.gperf
(1.45 KB)
📄
sysconf.gperf
(4.67 KB)
📁
tests
📄
unsigned_limits.gperf
(676 B)
Editing: unsigned_limits.gperf
%{ /* * Copyright is disclaimed as to the contents of this file. * * $FreeBSD$ */ #include <sys/types.h> #include <string.h> #include <limits.h> #include "getconf.h" /* * Override gperf's built-in external scope. */ static const struct map *in_word_set(const char *str); %} struct map { const char *name; uintmax_t value; int valid; }; %% UCHAR_MAX, UCHAR_MAX UINT_MAX, UINT_MAX ULLONG_MAX, ULLONG_MAX ULONG_MAX, ULONG_MAX USHRT_MAX, USHRT_MAX %% int find_unsigned_limit(const char *name, uintmax_t *value) { const struct map *rv; rv = in_word_set(name); if (rv != NULL) { if (rv->valid) { *value = rv->value; return 1; } return -1; } return 0; }
Upload File
Create Folder