DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ G T g ┃
Length: 1423 (0x58f) Types: TextFile Names: »GET_ARG_68K_UNIX_C«, »get_arg.c«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─ ⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦591c5b094⟧ └─⟦this⟧ └─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─ ⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦dfeb830e8⟧ └─ ⟦this⟧ »rev6-0-0/tools/ada-param/get_arg.c«
/* -------------------------------------------------------------------- */ /* -- C routine Get_Argument -- */ /* -------------------------------------------------------------------- */ extern int ada__argc_save; /* number of command line arguments */ extern char **ada__argv_save; /* pointers to command line arguments */ short Get_ArgC() { return ada__argc_save; } /* Get_ArgC */ short Get_ArgV( arg_index, arg_ptr, arg_max_len ) short arg_index; /* index number of argument to be returned */ char *arg_ptr; /* pointer to string for storing argument */ short arg_max_len; /* maximum length of arg_ptr string */ { register char *arg; /* pointer to the argument */ register char *stop; /* maximum pointer for the argument */ /* check argument position number */ if (arg_index >= ada__argc_save) return -1; /* one pass for every character in the parameter */ /* until the null character at the end of the */ /* parameter is found */ arg = ada__argv_save[arg_index]; stop = arg + arg_max_len; for ( ; arg < stop; ) { if ((*arg_ptr++ = *arg++) == '\0') { --arg; break; } } /* return the length of the string */ return (short)(arg - ada__argv_save[arg_index]); } /* Get_Argument */