Simple embedded shell with runtime pluggable commands.

Dependents:   DataBus2018

Implements a simple unix-like shell for embedded systems with a pluggable command architecture.

Committer:
shimniok
Date:
Fri Dec 28 17:10:31 2018 +0000
Revision:
31:27e8130a0d8f
Child:
32:fc09f0eb1e8a
began wildcard implementation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 31:27e8130a0d8f 1 /*-
shimniok 31:27e8130a0d8f 2 * Copyright (c) 1992, 1993
shimniok 31:27e8130a0d8f 3 * The Regents of the University of California. All rights reserved.
shimniok 31:27e8130a0d8f 4 *
shimniok 31:27e8130a0d8f 5 * Redistribution and use in source and binary forms, with or without
shimniok 31:27e8130a0d8f 6 * modification, are permitted provided that the following conditions
shimniok 31:27e8130a0d8f 7 * are met:
shimniok 31:27e8130a0d8f 8 * 1. Redistributions of source code must retain the above copyright
shimniok 31:27e8130a0d8f 9 * notice, this list of conditions and the following disclaimer.
shimniok 31:27e8130a0d8f 10 * 2. Redistributions in binary form must reproduce the above copyright
shimniok 31:27e8130a0d8f 11 * notice, this list of conditions and the following disclaimer in the
shimniok 31:27e8130a0d8f 12 * documentation and/or other materials provided with the distribution.
shimniok 31:27e8130a0d8f 13 * 3. All advertising materials mentioning features or use of this software
shimniok 31:27e8130a0d8f 14 * must display the following acknowledgement:
shimniok 31:27e8130a0d8f 15 * This product includes software developed by the University of
shimniok 31:27e8130a0d8f 16 * California, Berkeley and its contributors.
shimniok 31:27e8130a0d8f 17 * 4. Neither the name of the University nor the names of its contributors
shimniok 31:27e8130a0d8f 18 * may be used to endorse or promote products derived from this software
shimniok 31:27e8130a0d8f 19 * without specific prior written permission.
shimniok 31:27e8130a0d8f 20 *
shimniok 31:27e8130a0d8f 21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
shimniok 31:27e8130a0d8f 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
shimniok 31:27e8130a0d8f 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
shimniok 31:27e8130a0d8f 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
shimniok 31:27e8130a0d8f 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
shimniok 31:27e8130a0d8f 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
shimniok 31:27e8130a0d8f 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
shimniok 31:27e8130a0d8f 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
shimniok 31:27e8130a0d8f 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
shimniok 31:27e8130a0d8f 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
shimniok 31:27e8130a0d8f 31 * SUCH DAMAGE.
shimniok 31:27e8130a0d8f 32 *
shimniok 31:27e8130a0d8f 33 * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
shimniok 31:27e8130a0d8f 34 *
shimniok 31:27e8130a0d8f 35 * From FreeBSD fnmatch.h 1.7
shimniok 31:27e8130a0d8f 36 * $Id: fnmatch.h,v 1.4 2001/10/04 02:46:21 jdp Exp $
shimniok 31:27e8130a0d8f 37 */
shimniok 31:27e8130a0d8f 38
shimniok 31:27e8130a0d8f 39 #ifndef _FNMATCH_H_
shimniok 31:27e8130a0d8f 40 #define _FNMATCH_H_
shimniok 31:27e8130a0d8f 41
shimniok 31:27e8130a0d8f 42 #define FNM_NOMATCH 1 /* Match failed. */
shimniok 31:27e8130a0d8f 43
shimniok 31:27e8130a0d8f 44 #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
shimniok 31:27e8130a0d8f 45 #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
shimniok 31:27e8130a0d8f 46 #define FNM_PERIOD 0x04 /* Period must be matched by period. */
shimniok 31:27e8130a0d8f 47 #define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
shimniok 31:27e8130a0d8f 48 #define FNM_CASEFOLD 0x10 /* Case insensitive search. */
shimniok 31:27e8130a0d8f 49 #define FNM_PREFIX_DIRS 0x20 /* Directory prefixes of pattern match too. */
shimniok 31:27e8130a0d8f 50
shimniok 31:27e8130a0d8f 51 /* Make this compile successfully with "gcc -traditional" */
shimniok 31:27e8130a0d8f 52 #ifndef __STDC__
shimniok 31:27e8130a0d8f 53 #define const /* empty */
shimniok 31:27e8130a0d8f 54 #endif
shimniok 31:27e8130a0d8f 55
shimniok 31:27e8130a0d8f 56 int fnmatch(const char *, const char *, int);
shimniok 31:27e8130a0d8f 57
shimniok 31:27e8130a0d8f 58 #endif /* !_FNMATCH_H_ */