summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cumsum.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/cumsum.h b/include/cumsum.h
new file mode 100644
index 0000000..9761a08
--- /dev/null
+++ b/include/cumsum.h
@@ -0,0 +1,33 @@
+/*
+ */
+
+#ifndef H_CDF
+#define H_CDF
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <getopt.h>
+#include <string.h>
+#include <stdint.h>
+#include <assert.h>
+
+typedef union {
+ int64_t i;
+ uint64_t u;
+ double d;
+} Number;
+
+static int parse_options(int argc, char*const* argv);
+static void help();
+static int process_data(FILE *file);
+static void print_sum(Number sum);
+
+static int read_data_int(FILE *file, Number *num);
+static int read_data_uint(FILE *file, Number *num);
+static int read_data_fp(FILE *file, Number *num);
+
+#endif
+
+