]> git.sesse.net Git - nageru/blobdiff - flags.cpp
Fix infinite memory growth in the nut muxer.
[nageru] / flags.cpp
index e0c638b708469a854cedfd6f869bb7de5e181a1f..21e71e99208765ee1122e6900fa3464f98b3839a 100644 (file)
--- a/flags.cpp
+++ b/flags.cpp
@@ -1,9 +1,8 @@
-#include <stdio.h>
+#include "flags.h"
+
 #include <getopt.h>
+#include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-
-#include "flags.h"
 
 Flags global_flags;
 
@@ -11,6 +10,7 @@ void parse_flags(int argc, char * const argv[])
 {
        static const option long_options[] = {
                { "num-cards", required_argument, 0, 'c' },
+               { "va-display", required_argument, 0, 1000 },
                { 0, 0, 0, 0 }
        };
        for ( ;; ) {
@@ -24,6 +24,9 @@ void parse_flags(int argc, char * const argv[])
                case 'c':
                        global_flags.num_cards = atoi(optarg);
                        break;
+               case 1000:
+                       global_flags.va_display = optarg;
+                       break;
                default:
                        fprintf(stderr, "Unknown option '%s'\n", argv[option_index]);
                        exit(1);