]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Merge branch 'cooking' into threading
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index feb8aa3886ab128491f9e9af401beea9775e7ba2..042103b50c1bc7565d292a6a7eab5b286489e053 100644 (file)
--- a/main.c
+++ b/main.c
@@ -216,6 +216,11 @@ static bool options_parse(int argc, char **argv) {
                 OPTS_OPTION_U16 (OPTION_FORCED_CRC) = strtol(argarg, NULL, 0);
                 continue;
             }
+            if (options_long_gcc("jobs", &argc, &argv, &argarg)) {
+
+                OPTS_OPTION_U32 (OPTION_J) = strtol(argarg, NULL, 0);
+                continue;
+            }
             if (options_long_gcc("redirout", &argc, &argv, &redirout)) {
                 con_change(redirout, redirerr);
                 continue;
@@ -463,6 +468,14 @@ static bool options_parse(int argc, char **argv) {
                     vec_push(items, item);
                     break;
 
+                case 'j':
+                    if (!options_witharg(&argc, &argv, &argarg)) {
+                        con_out("option -j requires a parameter\n");
+                        return false;
+                    }
+                    OPTS_OPTION_U32 (OPTION_J) = strtol(argarg, NULL, 0);
+                    break;
+
                 case '-':
                     if (!argv[0][2]) {
                         /* anything following -- is considered a non-option argument */