You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
|
|
INPUT=${INPUT:-input}
|
|
|
|
NUM=$(wc -l < ${INPUT})
|
|
|
|
echo "#include <input.h>"
|
|
echo ""
|
|
echo "const input_t INPUT[${NUM}] = {"
|
|
while IFS= read -r line; do
|
|
echo " $line, "
|
|
done < $INPUT
|
|
unset line
|
|
echo "};"
|
|
echo "const size_t INPUT_SIZE=${NUM};"
|