2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include <proto/utility.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
14 #include <proto/dos.h>
16 AROS_LH2(LONG
, FindArg
,
19 AROS_LHA(CONST_STRPTR
, template, D1
),
20 AROS_LHA(CONST_STRPTR
, keyword
, D2
),
23 struct DosLibrary
*, DOSBase
, 134, Dos
)
26 Search for keyword in the template string.
27 Abbreviations are handled.
30 template - template string to be searched
31 keyword - keyword to search for
34 Index of the keyword or -1 if not found.
46 *****************************************************************************/
53 /* Loop over template */
56 /* Compare key to template */
62 /* If the keyword has ended check the template */
65 if(!*template||*template=='='||*template=='/'||*template==',')
66 /* The template has ended, too. Return count. */
68 /* The template isn't finished. Stop comparison. */
71 /* If the two differ stop comparison. */
73 if(lkey
!=ToLower(*template))
75 /* Go to next character */
79 /* Find next keyword in template */