summaryrefslogtreecommitdiff
path: root/examples/askme.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/askme.c')
-rw-r--r--examples/askme.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/examples/askme.c b/examples/askme.c
deleted file mode 100644
index dcb4267..0000000
--- a/examples/askme.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h> /* for printf, fgets */
-#include <stdlib.h> /* for atoi */
-#include <stdint.h> /* for uint32_t */
-#include <safe_iop.h> /* for awesomeness */
-
-int main(int argc, char **argv) {
- char buf[1024];
- uint32_t width = 0, height = 0, pixels = 0;
- printf("Please specify the width of the new image: ");
- width = strtoul(fgets(buf, 1023, stdin), NULL, 10);
- printf("Please specify the height of the new image: ");
- height = strtoul(fgets(buf, 1023, stdin), NULL, 10);
- if (safe_mul(&pixels, width, height)) {
- printf("The resulting image will have %u pixels.\n", pixels);
- return 0;
- } else {
- printf("Image size specified exceeds maximum size!\n");
- return 1;
- }
-}