]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Merge branch 'master' into threading
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 98de0e9176b4e9924e07757b536b41a6bee2446b..03da18f54bbbd1994c5e0e09930f4c7fbcdc907b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -218,6 +218,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;
@@ -465,6 +470,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 */