From b1260e7f5c172d5cf1fc4e5946560aab7a645f40 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 12 Nov 2011 10:40:00 -0500 Subject: [PATCH] adding a script to help me check for my uses of the io functions --- .gitignore | 3 ++- check-for-iofunctions.sh | 6 ++++++ iofunctions.txt | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 check-for-iofunctions.sh create mode 100644 iofunctions.txt diff --git a/.gitignore b/.gitignore index 5ba293d..d8e72e9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ !*.py !*.h !*.mk -!test_*.sh +!*.sh !*-input +!*.txt diff --git a/check-for-iofunctions.sh b/check-for-iofunctions.sh new file mode 100755 index 0000000..59d5f3e --- /dev/null +++ b/check-for-iofunctions.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for func in $(cat iofunctions.txt) +do + echo "$func: $(grep "$func" *.c | wc -l)" +done diff --git a/iofunctions.txt b/iofunctions.txt new file mode 100644 index 0000000..e9c7947 --- /dev/null +++ b/iofunctions.txt @@ -0,0 +1,14 @@ +fscanf +fgets +fopen +freopen +fdopen +fclose +fcloseall +fgetpos +fseek +ftell +rewind +fprintf +fwrite +fread