s/qmail
4.3.20
Next generation secure email transport
Loading...
Searching...
No Matches
4.3
sqmail-4.3.20
src
auto-int.c
Go to the documentation of this file.
1
#include <unistd.h>
2
#include "buffer.h"
3
#include <unistd.h>
4
#include "
exit.h
"
5
#include "scan.h"
6
#include "fmt.h"
7
8
char
inbuf
[BUFFER_SMALL];
9
buffer
b
= BUFFER_INIT(
write
,1,
inbuf
,
sizeof
(
inbuf
));
10
11
void
out
(
char
*s)
12
{
13
if
(buffer_puts(&
b
,s) == -1)
_exit
(111);
14
}
15
16
int
main
(
int
argc,
char
*
const
*argv)
17
{
18
char
*name;
19
char
*value;
20
unsigned
long
num
;
21
char
strnum
[FMT_ULONG];
22
23
name = argv[1];
24
if
(!name)
_exit
(100);
25
value = argv[2];
26
if
(!value)
_exit
(100);
27
28
scan_ulong(value,&
num
);
29
strnum
[fmt_ulong(
strnum
,
num
)] = 0;
30
31
out
(
"int "
);
32
out
(name);
33
out
(
" = "
);
34
out
(
strnum
);
35
out
(
";\n"
);
36
if
(buffer_flush(&
b
) == -1)
_exit
(111);
37
_exit
(0);
38
}
b
buffer b
Definition:
auto-int.c:9
inbuf
char inbuf[BUFFER_SMALL]
Definition:
auto-int.c:8
main
int main()
Definition:
chkshsgr.c:6
num
char num[FMT_ULONG]
Definition:
chkspawn.c:8
out
stralloc out
Definition:
dnscname.c:12
exit.h
_exit
void _exit(int)
strnum
char strnum[FMT_ULONG]
Definition:
qmail-inject.c:505
write
void write()
Generated on Thu Jan 16 2025 17:42:03 for s/qmail by
1.9.6