/home/dko/projects/mobilec/tags/MobileC-v1.10.2/MobileC-v1.10.2/src/include/cmd_prompt.h

Go to the documentation of this file.
00001 /* SVN FILE INFO
00002  * $Revision: 207 $ : Last Committed Revision
00003  * $Date: 2008-07-11 17:55:19 -0700 (Fri, 11 Jul 2008) $ : Last Committed Date */
00004 /*[
00005  * Copyright (c) 2007 Integration Engineering Laboratory
00006                       University of California, Davis
00007  *
00008  * Permission to use, copy, and distribute this software and its
00009  * documentation for any purpose with or without fee is hereby granted,
00010  * provided that the above copyright notice appear in all copies and
00011  * that both that copyright notice and this permission notice appear
00012  * in supporting documentation.
00013  *
00014  * Permission to modify the software is granted, but not the right to
00015  * distribute the complete modified source code.  Modifications are to
00016  * be distributed as patches to the released version.  Permission to
00017  * distribute binaries produced by compiling modified sources is granted,
00018  * provided you
00019  *   1. distribute the corresponding source modifications from the
00020  *    released version in the form of a patch file along with the binaries,
00021  *   2. add special version identification to distinguish your version
00022  *    in addition to the base release version number,
00023  *   3. provide your name and address as the primary contact for the
00024  *    support of your modified version, and
00025  *   4. retain our contact information in regard to use of the base
00026  *    software.
00027  * Permission to distribute the released version of the source code along
00028  * with corresponding source modifications in the form of a patch file is
00029  * granted with same provisions 2 through 4 for binary distributions.
00030  *
00031  * This software is provided "as is" without express or implied warranty
00032  * to the extent permitted by applicable law.
00033 ]*/
00034 
00035 #ifndef _CMD_PROMPT_H_
00036 #define _CMD_PROMPT_H_
00037 #define CMDLINE_SIZE 80
00038 #include "macros.h"
00039 
00040 struct mc_platform_s;
00041 typedef struct cmd_prompt_s {
00042   THREAD_T thread;
00043 } cmd_prompt_t;
00044 typedef cmd_prompt_t* cmd_prompt_p;
00045 
00046 typedef struct command_s {
00047   int index;
00048   int num_args;
00049   char **args;
00050 } command_t;
00051 typedef command_t* command_p;
00052 
00053 int
00054 cmd_prompt_Destroy(cmd_prompt_p cmd_prompt);
00055 
00056 cmd_prompt_p
00057 cmd_prompt_Initialize(struct mc_platform_s* mc_platform);
00058 
00059 void
00060 cmd_prompt_Start( struct mc_platform_s* mc_platform );
00061 
00062 int split_string(char ***args, const char *buf);
00063 int process_command(command_t *cmd);
00064 #ifndef _WIN32
00065 void*
00066 cmd_prompt_Thread(void* arg);
00067 #else
00068 DWORD WINAPI
00069 cmd_prompt_Thread(LPVOID arg);
00070 #endif
00071 int exec_command(command_t cmd, struct mc_platform_s* global);
00072 int dealloc_command(command_t *cmd);
00073 #endif

Generated on Fri Jul 11 17:59:44 2008 for Mobile-C by  doxygen 1.5.4