summaryrefslogtreecommitdiff
path: root/examples/program_analysis/paper_demos/api3.before.txt
diff options
context:
space:
mode:
authorMatthew Sotoudeh <masotoudeh@ucdavis.edu>2020-11-10 14:16:20 -0800
committerGitHub <noreply@github.com>2020-11-10 14:16:20 -0800
commitde88829eccd369aa1872413d6068d5179468c47e (patch)
tree1947f69081b4f647c643b0f9d5ce8c246a9b097c /examples/program_analysis/paper_demos/api3.before.txt
parentdb99b3af36fa4687c734e1c74d83157d2f10c9ed (diff)
parentbe64046354a0451869d475e7f0d35f4eb2344c93 (diff)
Initial Code ReleaseHEADmaster
Contains code for reproducing the demos from our Onward '20 paper about Sifter.
Diffstat (limited to 'examples/program_analysis/paper_demos/api3.before.txt')
-rw-r--r--examples/program_analysis/paper_demos/api3.before.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/program_analysis/paper_demos/api3.before.txt b/examples/program_analysis/paper_demos/api3.before.txt
new file mode 100644
index 0000000..cb8d731
--- /dev/null
+++ b/examples/program_analysis/paper_demos/api3.before.txt
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include "cam.h"
+
+#define BUFFER_SIZE (1024)
+char buffer[BUFFER_SIZE];
+
+void try_record_still() {
+ int result = cam_record_frame(buffer, BUFFER_SIZE, RES_AUTO);
+ if (result == -3) {
+ printf("Could not record audio.\n");
+ } else {
+ printf("Recorded audio!\n");
+ }
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback