6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
33 [ :LNOT::DEF:cmdLine__dfn
38 ; On entry: R0 == pointer to a command line string (ctrl terminated)
39 ; R1 == pointer to a buffer (may be equal to R0)
41 ; On exit: CS if another word found, and
42 ; R0 == updated past next word
43 ; R1 preserved, buffer filled with null terminated string
44 ; R2 == pointer to terminating null character
46 ; R0 == pointer to terminating character
47 ; R1 preserved, buffer preserved
50 ; Use: Extracts the next word from a command line string. If the
51 ; string is in a writable buffer, you can set R1 == R0 to
52 ; start with. You can build up a C-like argv array like this:
54 ; ; R0 == pointer to command line in writable buffer
68 ; This routine will handle quoted strings, considering them
69 ; to be single arguments. Either type of quote will do,
70 ; quote doubling is required to insert quotes in quoted
77 ;----- That's all, folks ----------------------------------------------------