Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of NaturalTinyShell by
ntshell.h@2:61c70abc5690, 2015-03-19 (annotated)
- Committer:
- co2_kun
- Date:
- Thu Mar 19 15:04:48 2015 +0000
- Revision:
- 2:61c70abc5690
- Parent:
- 0:7147d6024de8
file doc fix
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shintamainjp | 0:7147d6024de8 | 1 | /** |
| shintamainjp | 0:7147d6024de8 | 2 | * @file ntshell.h |
| shintamainjp | 0:7147d6024de8 | 3 | * @author Shinichiro Nakamura |
| shintamainjp | 0:7147d6024de8 | 4 | * @brief 小規模組み込みシステム向けのシェルシステムの定義。 |
| shintamainjp | 0:7147d6024de8 | 5 | */ |
| shintamainjp | 0:7147d6024de8 | 6 | |
| shintamainjp | 0:7147d6024de8 | 7 | /* |
| shintamainjp | 0:7147d6024de8 | 8 | * =============================================================== |
| shintamainjp | 0:7147d6024de8 | 9 | * Natural Tiny Shell (NT-Shell) |
| shintamainjp | 0:7147d6024de8 | 10 | * Version 0.0.6 |
| shintamainjp | 0:7147d6024de8 | 11 | * =============================================================== |
| shintamainjp | 0:7147d6024de8 | 12 | * Copyright (c) 2010-2011 Shinichiro Nakamura |
| shintamainjp | 0:7147d6024de8 | 13 | * |
| shintamainjp | 0:7147d6024de8 | 14 | * Permission is hereby granted, free of charge, to any person |
| shintamainjp | 0:7147d6024de8 | 15 | * obtaining a copy of this software and associated documentation |
| shintamainjp | 0:7147d6024de8 | 16 | * files (the "Software"), to deal in the Software without |
| shintamainjp | 0:7147d6024de8 | 17 | * restriction, including without limitation the rights to use, |
| shintamainjp | 0:7147d6024de8 | 18 | * copy, modify, merge, publish, distribute, sublicense, and/or |
| shintamainjp | 0:7147d6024de8 | 19 | * sell copies of the Software, and to permit persons to whom the |
| shintamainjp | 0:7147d6024de8 | 20 | * Software is furnished to do so, subject to the following |
| shintamainjp | 0:7147d6024de8 | 21 | * conditions: |
| shintamainjp | 0:7147d6024de8 | 22 | * |
| shintamainjp | 0:7147d6024de8 | 23 | * The above copyright notice and this permission notice shall be |
| shintamainjp | 0:7147d6024de8 | 24 | * included in all copies or substantial portions of the Software. |
| shintamainjp | 0:7147d6024de8 | 25 | * |
| shintamainjp | 0:7147d6024de8 | 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| shintamainjp | 0:7147d6024de8 | 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| shintamainjp | 0:7147d6024de8 | 28 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| shintamainjp | 0:7147d6024de8 | 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| shintamainjp | 0:7147d6024de8 | 30 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| shintamainjp | 0:7147d6024de8 | 31 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| shintamainjp | 0:7147d6024de8 | 32 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| shintamainjp | 0:7147d6024de8 | 33 | * OTHER DEALINGS IN THE SOFTWARE. |
| shintamainjp | 0:7147d6024de8 | 34 | * =============================================================== |
| shintamainjp | 0:7147d6024de8 | 35 | */ |
| shintamainjp | 0:7147d6024de8 | 36 | |
| shintamainjp | 0:7147d6024de8 | 37 | #ifndef _NTSHELL_H_ |
| shintamainjp | 0:7147d6024de8 | 38 | #define _NTSHELL_H_ |
| shintamainjp | 0:7147d6024de8 | 39 | |
| shintamainjp | 0:7147d6024de8 | 40 | #include "vtparse.h" |
| shintamainjp | 0:7147d6024de8 | 41 | #include "text_editor.h" |
| shintamainjp | 0:7147d6024de8 | 42 | #include "text_history.h" |
| shintamainjp | 0:7147d6024de8 | 43 | |
| shintamainjp | 0:7147d6024de8 | 44 | typedef struct { |
| shintamainjp | 0:7147d6024de8 | 45 | vtparse_t parser; |
| shintamainjp | 0:7147d6024de8 | 46 | text_editor_t editor; |
| shintamainjp | 0:7147d6024de8 | 47 | text_history_t history; |
| shintamainjp | 0:7147d6024de8 | 48 | } ntshell_t; |
| shintamainjp | 0:7147d6024de8 | 49 | |
| shintamainjp | 0:7147d6024de8 | 50 | void ntshell_version(int *major, int *minor, int *release); |
| shintamainjp | 0:7147d6024de8 | 51 | void ntshell_execute( |
| shintamainjp | 0:7147d6024de8 | 52 | ntshell_t *p, |
| shintamainjp | 0:7147d6024de8 | 53 | int (*func_read)(char *buf, int cnt), |
| shintamainjp | 0:7147d6024de8 | 54 | int (*func_write)(const char *buf, int cnt), |
| shintamainjp | 0:7147d6024de8 | 55 | int (*func_cb)(const char *text)); |
| shintamainjp | 0:7147d6024de8 | 56 | |
| shintamainjp | 0:7147d6024de8 | 57 | #endif |
| shintamainjp | 0:7147d6024de8 | 58 |
