Changeset 45 for trunk/src/kmk/job.c


Ignore:
Timestamp:
Apr 3, 2003, 4:23:37 AM (22 years ago)
Author:
bird
Message:

KMK changes..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/job.c

    r35 r45  
    4646#endif /* not lint */
    4747
    48 #ifdef NMAKE
     48#if defined(NMAKE) || defined(KMK)
    4949#define OLD_JOKE 1
    5050#endif
     
    190190static char     tfile[sizeof(TMPPAT)];
    191191
    192 
     192#ifndef KMK
    193193/*
    194194 * Descriptions for various shells.
     
    237237                                                   * executable image */
    238238                *shellName;                       /* last component of shell */
     239#endif /*!KMK*/
    239240
    240241
     
    326327static void JobExec __P((Job *, char **));
    327328#endif
     329#ifndef KMK
    328330static void JobMakeArgv __P((Job *, char **));
     331#endif
    329332static void JobRestart __P((Job *));
    330333static int JobStart __P((GNode *, int, Job *));
     
    594597        cmd++;
    595598
     599    #ifndef KMK
    596600    if (shutUp) {
    597601        if (!(job->flags & JOB_SILENT) && !noSpecials &&
     
    602606        }
    603607    }
     608    #endif
    604609
    605610    if (errOff) {
    606611        if ( !(job->flags & JOB_IGNERR) && !noSpecials) {
     612            #ifdef KMK
     613            errOff = FALSE;
     614            #else
    607615            if (commandShell->hasErrCtl) {
    608616                /*
     
    650658                errOff = FALSE;
    651659            }
     660            #endif
    652661        } else {
    653662            errOff = FALSE;
     
    657666    DBPRINTF(cmdTemplate, cmd);
    658667
     668    #ifndef KMK /*todo*/
    659669    if (errOff) {
    660670        /*
     
    672682        DBPRINTF("%s\n", commandShell->echoOn);
    673683    }
     684    #endif
    674685    return 0;
    675686}
     
    11501161                if (strcmp(gn->name,"love") == 0)
    11511162                    (*abortProc)("Not war.");
    1152 #ifdef NMAKE
     1163#if defined(NMAKE) || defined(KMK)
    11531164        else if (strcmp(gn->name,"fire") == 0)
    11541165                    (*abortProc)("No match.");
     
    13021313        } else
    13031314#endif /* REMOTE */
     1315#ifdef KMK
     1316           (void) execv(argv[0], argv);
     1317#else
    13041318           (void) execv(shellPath, argv);
     1319#endif
    13051320
    13061321        (void) write(2, "Could not execute shell\n",
     
    13621377}
    13631378
     1379
    13641380/*-
    13651381 *-----------------------------------------------------------------------
     
    13821398    static char   args[10];     /* For merged arguments */
    13831399
     1400#ifndef _PATH_DEFSHELLDIR
     1401    /* @todo! */
     1402    argv[0] = "c:\\os2\\cmd.exe";
     1403    argc = 1;
     1404#else
    13841405    argv[0] = shellName;
    13851406    argc = 1;
     
    14151436    }
    14161437    argv[argc] = NULL;
     1438#endif
    14171439}
     1440
    14181441
    14191442/*-
     
    19882011    register char *ecp;
    19892012
     2013    #ifndef KMK /* @Todo */
    19902014    if (commandShell->noPrint) {
    19912015        ecp = Str_FindSubstring(cp, commandShell->noPrint);
     
    20232047        }
    20242048    }
     2049    #endif /*!KMK*/
    20252050    return cp;
    20262051}
     
    24622487    }
    24632488
     2489#ifndef KMK
    24642490    if (shellPath == NULL) {
    24652491        /*
     
    24802506        commandShell->echo = "";
    24812507    }
     2508#endif
    24822509
    24832510    /*
     
    25882615}
    25892616
     2617#ifndef KMK
    25902618/*-
    25912619 *-----------------------------------------------------------------------
     
    26292657    return(match == NULL ? sh : match);
    26302658}
    2631 
     2659#endif /*!KMK*/
     2660
     2661#ifndef KMK
    26322662/*-
    26332663 *-----------------------------------------------------------------------
     
    27932823    return SUCCESS;
    27942824}
     2825#endif /*!KMK*/
    27952826
    27962827/*-
Note: See TracChangeset for help on using the changeset viewer.