File: 02-library

package info (click to toggle)
rgxg 0.1.2-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,960 kB
  • sloc: sh: 4,385; ansic: 2,361; makefile: 63
file content (28 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -eu

WORKDIR=$(mktemp -d)
trap 'rm -rf ${WORKDIR}' 0 INT QUIT ABRT PIPE TERM

cd "${WORKDIR}"

cat <<EOF > rgxg-test.c
#include <stddef.h>
#include <rgxg/number.h>
#include <rgxg/net.h>

int main() {
    rgxg_number_range (0, 100, 16, 8, NULL, RGXG_NONULLBYTE);
    rgxg_net_cidr_string("::0/0", NULL, NULL, 0);
    return 0;
}
EOF

CFLAGS=$(pkg-config --cflags --libs rgxg)

gcc -o rgxg-test rgxg-test.c $CFLAGS

[ -x rgxg-test ]

./rgxg-test