forked from laurencelundblade/qdv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenintfun.sh
More file actions
executable file
·30 lines (28 loc) · 875 Bytes
/
genintfun.sh
File metadata and controls
executable file
·30 lines (28 loc) · 875 Bytes
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
29
30
#!/bin/sh
# This is to generate the QCBOR integer decode functions for the different sizes
# It is not done yet
for i in 8 16 32;
do
for u in "" U;
do
for c in "" Convert ConvertAll;
do
for n in "" InMapN InMapSZ;
do
smallu=`echo $u | tr U u`
echo static void QCBORDecode_Get${u}Int${i}${c}${n}\(QCBORDecodeContext \*Cptx, uint32_t uOptions, ${smallu}int${i}_t \*puValue\)\;
echo "{"
if [ "$c" = "" ] ;
then
echo " QCBORDecode_GetInt${n}(pMe, QCBOR_CONVERT_TYPE_INT64, puValue);"
else
echo " QCBORItem Item"
echo " QCBORDecode_GetInt${n}${c}${n}(QCBORDecodeContext *pMe, nLabel, QCBOR_CONVERT_TYPE_INT64, puValue);"
fi
echo "}"
echo
echo
done
done
done
done