home *** CD-ROM | disk | FTP | other *** search
- Brendan, here is the latest change to the argument parsing for the
- nice option. I am including a file rdgram.h which includes the limits
- for the priorities.
-
- George, I don't think the parsing should affect you, but you might
- want to use the rdgram.h file for setting you limits.
-
- ~ Cliff
- ---rdgram.h---
- /*
- * Copyright (c) 1991 by the University of Washington
- *
- * For copying and distribution information, please see the file
- * <uw-copyright.h>.
- */
-
- #include <uw-copyright.h>
-
- /* Queuing priorities for datagrams */
- #define RDGRAM_MAX_PRI 32765 /* Maximum user proiority */
- #define RDGRAM_MAX_SPRI 32767 /* Maximum priority for system use */
- #define RDGRAM_MIN_PRI -32765 /* Maximum user proiority */
- #define RDGRAM_MIN_SPRI -32768 /* Maximum priority for system use */
- ---
- *** archie.c.old Wed Aug 14 20:46:38 1991
- --- archie.c Wed Aug 14 22:30:00 1991
- ***************
- *** 18,23 ****
- --- 18,24 ----
-
- #include <pfs.h>
- #include <perrno.h>
- + #include <rdgram.h>
-
- #define ARCHIE_HOST "ARCHIE.CS.MCGILL.CA"
-
- ***************
- *** 84,92 ****
- cur_arg += strspn(cur_arg,"0123456789");
- break;
-
- ! case 'N': /* Priority (nice, max 32767) */
- ! rdgram_priority = 32765; /* Default nice */
- sscanf(cur_arg,"%d",&rdgram_priority);
- cur_arg += strspn(cur_arg,"-0123456789");
- break;
-
- --- 85,97 ----
- cur_arg += strspn(cur_arg,"0123456789");
- break;
-
- ! case 'N': /* Priority (nice) */
- ! rdgram_priority = RDGRAM_MAX_PRI; /* Default nice */
- sscanf(cur_arg,"%d",&rdgram_priority);
- + if(rdgram_priority > RDGRAM_MAX_SPRI)
- + rdgram_priority = RDGRAM_MAX_PRI;
- + if(rdgram_priority < RDGRAM_MIN_SPRI)
- + rdgram_priority = RDGRAM_MIN_PRI;
- cur_arg += strspn(cur_arg,"-0123456789");
- break;
-
-
-