summaryrefslogtreecommitdiffstats
path: root/tools/schedsim/shell/shared/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/schedsim/shell/shared/include/newlib/_ansi.h99
-rw-r--r--tools/schedsim/shell/shared/include/newlib/getopt.h167
-rw-r--r--tools/schedsim/shell/shared/include/shell.h61
3 files changed, 0 insertions, 327 deletions
diff --git a/tools/schedsim/shell/shared/include/newlib/_ansi.h b/tools/schedsim/shell/shared/include/newlib/_ansi.h
deleted file mode 100644
index c52ba606d9..0000000000
--- a/tools/schedsim/shell/shared/include/newlib/_ansi.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Provide support for both ANSI and non-ANSI environments. */
-
-/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
- relied upon to have it's intended meaning. Therefore we must use our own
- concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
- sources!
-
- To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
- "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
- files aren't affected). */
-
-#ifndef _ANSIDECL_H_
-#define _ANSIDECL_H_
-
-/* #include <newlib.h> */
-/* #include <sys/config.h> */
-
-/* First try to figure out whether we really are in an ANSI C environment. */
-/* FIXME: This probably needs some work. Perhaps sys/config.h can be
- prevailed upon to give us a clue. */
-
-#ifdef __STDC__
-#define _HAVE_STDC
-#endif
-
-#ifdef _HAVE_STDC
-#define _PTR void *
-#define _AND ,
-#define _NOARGS void
-#define _CONST const
-#define _VOLATILE volatile
-#define _SIGNED signed
-#define _DOTS , ...
-#define _VOID void
-#ifdef __CYGWIN__
-#define _EXFUN(name, proto) __cdecl name proto
-#define _EXPARM(name, proto) (* __cdecl name) proto
-#else
-#define _EXFUN(name, proto) name proto
-#define _EXPARM(name, proto) (* name) proto
-#endif
-#define _DEFUN(name, arglist, args) name(args)
-#define _DEFUN_VOID(name) name(_NOARGS)
-#define _CAST_VOID (void)
-#ifndef _LONG_DOUBLE
-#define _LONG_DOUBLE long double
-#endif
-#ifndef _LONG_LONG
-#define _LONG_LONG long long
-#endif
-#ifndef _PARAMS
-#define _PARAMS(paramlist) paramlist
-#endif
-#else
-#define _PTR char *
-#define _AND ;
-#define _NOARGS
-#define _CONST
-#define _VOLATILE
-#define _SIGNED
-#define _DOTS
-#define _VOID void
-#define _EXFUN(name, proto) name()
-#define _DEFUN(name, arglist, args) name arglist args;
-#define _DEFUN_VOID(name) name()
-#define _CAST_VOID
-#define _LONG_DOUBLE double
-#define _LONG_LONG long
-#ifndef _PARAMS
-#define _PARAMS(paramlist) ()
-#endif
-#endif
-
-/* Support gcc's __attribute__ facility. */
-
-#ifdef __GNUC__
-#define _ATTRIBUTE(attrs) __attribute__ (attrs)
-#else
-#define _ATTRIBUTE(attrs)
-#endif
-
-/* ISO C++. */
-
-#ifdef __cplusplus
-#if !(defined(_BEGIN_STD_C) && defined(_END_STD_C))
-#ifdef _HAVE_STD_CXX
-#define _BEGIN_STD_C namespace std { extern "C" {
-#define _END_STD_C } }
-#else
-#define _BEGIN_STD_C extern "C" {
-#define _END_STD_C }
-#endif
-#endif
-#else
-#define _BEGIN_STD_C
-#define _END_STD_C
-#endif
-
-#endif /* _ANSIDECL_H_ */
diff --git a/tools/schedsim/shell/shared/include/newlib/getopt.h b/tools/schedsim/shell/shared/include/newlib/getopt.h
deleted file mode 100644
index 2d397eb185..0000000000
--- a/tools/schedsim/shell/shared/include/newlib/getopt.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-
-getopt.h - Read command line options
-
-AUTHOR: Gregory Pietsch
-CREATED Thu Jan 09 22:37:00 1997
-
-DESCRIPTION:
-
-The getopt() function parses the command line arguments. Its arguments argc
-and argv are the argument count and array as passed to the main() function
-on program invocation. The argument optstring is a list of available option
-characters. If such a character is followed by a colon (`:'), the option
-takes an argument, which is placed in optarg. If such a character is
-followed by two colons, the option takes an optional argument, which is
-placed in optarg. If the option does not take an argument, optarg is NULL.
-
-The external variable optind is the index of the next array element of argv
-to be processed; it communicates from one call to the next which element to
-process.
-
-The getopt_long() function works like getopt() except that it also accepts
-long options started by two dashes `--'. If these take values, it is either
-in the form
-
---arg=value
-
- or
-
---arg value
-
-It takes the additional arguments longopts which is a pointer to the first
-element of an array of type GETOPT_LONG_OPTION_T, defined below. The last
-element of the array has to be filled with NULL for the name field.
-
-The longind pointer points to the index of the current long option relative
-to longopts if it is non-NULL.
-
-The getopt() function returns the option character if the option was found
-successfully, `:' if there was a missing parameter for one of the options,
-`?' for an unknown option character, and EOF for the end of the option list.
-
-The getopt_long() function's return value is described below.
-
-The function getopt_long_only() is identical to getopt_long(), except that a
-plus sign `+' can introduce long options as well as `--'.
-
-Describe how to deal with options that follow non-option ARGV-elements.
-
-If the caller did not specify anything, the default is REQUIRE_ORDER if the
-environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
-REQUIRE_ORDER means don't recognize them as options; stop option processing
-when the first non-option is seen. This is what Unix does. This mode of
-operation is selected by either setting the environment variable
-POSIXLY_CORRECT, or using `+' as the first character of the optstring
-parameter.
-
-PERMUTE is the default. We permute the contents of ARGV as we scan, so that
-eventually all the non-options are at the end. This allows options to be
-given in any order, even with programs that were not written to expect this.
-
-RETURN_IN_ORDER is an option available to programs that were written to
-expect options and other ARGV-elements in any order and that care about the
-ordering of the two. We describe each non-option ARGV-element as if it were
-the argument of an option with character code 1. Using `-' as the first
-character of the optstring parameter selects this mode of operation.
-
-The special argument `--' forces an end of option-scanning regardless of the
-value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause
-getopt() and friends to return EOF with optind != argc.
-
-COPYRIGHT NOTICE AND DISCLAIMER:
-
-Copyright (C) 1997 Gregory Pietsch
-
-This file and the accompanying getopt.c implementation file are hereby
-placed in the public domain without restrictions. Just give the author
-credit, don't claim you wrote it or prevent anyone else from using it.
-
-Gregory Pietsch's current e-mail address:
-gpietsch@comcast.net
-****************************************************************************/
-
-/* use _GETOPT_H so we avoid dupe include of glibc getopt.h */
-#ifndef _GETOPT_H
-#define _GETOPT_H
-
-#include <newlib/_ansi.h>
-
-/* include files needed by this include file */
-
- /* These #defines are to keep the namespace clear... */
-#define getopt_r __getopt_r
-#define getopt_long_r __getopt_long_r
-#define getopt_long_only_r __getopt_long_only_r
-
-#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* __cplusplus */
-
-/* types defined by this include file */
- struct option
- {
- char *name; /* the name of the long option */
- int has_arg; /* one of the above macros */
- int *flag; /* determines if getopt_long() returns a
- * value for a long option; if it is
- * non-NULL, 0 is returned as a function
- * value and the value of val is stored in
- * the area pointed to by flag. Otherwise,
- * val is returned. */
- int val; /* determines the value to return if flag is
- * NULL. */
-
- };
-
- /* The getopt_data structure is for reentrancy. Its members are similar to
- the externally-defined variables. */
- typedef struct getopt_data
- {
- char *optarg;
- int optind, opterr, optopt, optwhere;
- } getopt_data;
-
- /* externally-defined variables */
- extern char *optarg;
- extern int optind;
- extern int opterr;
- extern int optopt;
-
- /* function prototypes */
- int _EXFUN (getopt,
- (int __argc, char *const __argv[], const char *__optstring));
-
- int _EXFUN (getopt_long,
- (int __argc, char *const __argv[], const char *__shortopts,
- const struct option * __longopts, int *__longind));
-
- int _EXFUN (getopt_long_only,
- (int __argc, char *const __argv[], const char *__shortopts,
- const struct option * __longopts, int *__longind));
-
- int _EXFUN (__getopt_r,
- (int __argc, char *const __argv[], const char *__optstring,
- struct getopt_data * __data));
-
- int _EXFUN (__getopt_long_r,
- (int __argc, char *const __argv[], const char *__shortopts,
- const struct option * __longopts, int *__longind,
- struct getopt_data * __data));
-
- int _EXFUN (__getopt_long_only_r,
- (int __argc, char *const __argv[], const char *__shortopts,
- const struct option * __longopts, int *__longind,
- struct getopt_data * __data));
-
-#ifdef __cplusplus
-};
-
-#endif /* __cplusplus */
-
-#endif /* GETOPT_H */
-
-/* END OF FILE getopt.h */
diff --git a/tools/schedsim/shell/shared/include/shell.h b/tools/schedsim/shell/shared/include/shell.h
deleted file mode 100644
index d5209f6cd7..0000000000
--- a/tools/schedsim/shell/shared/include/shell.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * BASED UPON SOURCE IN RTEMS, MODIFIED FOR SIMULATOR
- *
- * COPYRIGHT (c) 1989-2010.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-
-#ifndef __SHELL_h
-#define __SHELL_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int (*rtems_shell_command_t)(int argc, char **argv);
-
-struct rtems_shell_cmd_tt;
-typedef struct rtems_shell_cmd_tt rtems_shell_cmd_t;
-
-struct rtems_shell_cmd_tt {
- const char *name;
- const char *usage;
- const char *topic;
- rtems_shell_command_t command;
- rtems_shell_cmd_t *alias;
- rtems_shell_cmd_t *next;
-};
-
-typedef struct {
- const char *name;
- const char *alias;
-} rtems_shell_alias_t;
-
-void rtems_shell_initialize_command_set(void);
-
-rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd);
-
-rtems_shell_cmd_t * rtems_shell_alias_cmd(
- const char *cmd,
- const char *alias
-);
-
-int rtems_shell_make_args(
- char *commandLine,
- int *argc_p,
- char **argv_p,
- int max_args
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif