about summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-03-25 16:22:45 +0300
committerNakidai <nakidai@disroot.org>2025-03-25 16:22:45 +0300
commit017ec3b6dc3e1badd9bb9505029802c6f6986c4b (patch)
treeb01e284a7aea1852632f6220c2cac11712d4254b /main.c
parent2d5f634d0d28a0762835afa01dd1e9eb212e4803 (diff)
download3cl-017ec3b6dc3e1badd9bb9505029802c6f6986c4b.tar.gz
3cl-017ec3b6dc3e1badd9bb9505029802c6f6986c4b.zip
Add some cool features
- I absolutely forgot about # and :, but now fortunately it's a fixed
  problem
- Add -d flag so 3cl will dump its state after executing
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.c b/main.c
index b2d96ca..da9d64e 100644
--- a/main.c
+++ b/main.c
@@ -9,13 +9,15 @@
 
 
 int verbose = 0;
+int interactive = 0;
+int dump = 0;
 
 int main(int argc, char **argv)
 {
     const char *name = *argv;
 
     int ch;
-    while ((ch = getopt(argc, argv, "v")) >= 0)
+    while ((ch = getopt(argc, argv, "vid")) >= 0)
     {
         switch (ch)
         {
@@ -23,9 +25,17 @@ int main(int argc, char **argv)
             {
                 verbose = 1;
             } break;
+            case 'i':
+            {
+                interactive = 1;
+            } break;
+            case 'd':
+            {
+                dump = 1;
+            } break;
             default:
             {
-                fprintf(stderr, "usage: %s [-v] file\n", name);
+                fprintf(stderr, "usage: %s [-vid] file\n", name);
                 exit(1);
             } break;
         }
@@ -35,7 +45,7 @@ int main(int argc, char **argv)
 
     if (!*argv)
     {
-        fprintf(stderr, "usage: %s [-v] file\n", name);
+        fprintf(stderr, "usage: %s [-vid] file\n", name);
         exit(1);
     }