Changeset 22cf42d9 in mainline
- Timestamp:
- 2011-08-20T22:58:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e406736
- Parents:
- f41682c
- Location:
- uspace
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile
rf41682c r22cf42d9 162 162 lib/block \ 163 163 lib/clui \ 164 lib/fmtutil \ 164 165 lib/scsi \ 165 166 lib/softint \ -
uspace/Makefile.common
rf41682c r22cf42d9 108 108 LIBIMGMAP_PREFIX = $(LIB_PREFIX)/imgmap 109 109 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui 110 LIBFMTUTIL_PREFIX = $(LIB_PREFIX)/fmtutil 110 111 111 112 LIBEXT2_PREFIX = $(LIB_PREFIX)/ext2 -
uspace/app/bdsh/Makefile
rf41682c r22cf42d9 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) -I. -Icmds/ \ 33 -Icmds/builtins -Icmds/modules 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a \ 32 $(LIBFMTUTIL_PREFIX)/libfmtutil.a 33 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) -I$(LIBFMTUTIL_PREFIX)\ 34 -I. -Icmds/ -Icmds/builtins -Icmds/modules 34 35 BINARY = bdsh 35 36 -
uspace/app/bdsh/cmds/modules/help/help.c
rf41682c r22cf42d9 1 1 /* 2 2 * Copyright (c) 2008 Tim Post 3 * Copyright (c) 2011 Martin Sucha 3 4 * All rights reserved. 4 5 * … … 30 31 #include <stdlib.h> 31 32 #include <str.h> 33 #include <fmtutil.h> 32 34 33 35 #include "config.h" … … 128 130 static void help_survival(void) 129 131 { 130 printf("Don't panic!\n\n"); 131 132 printf("This is Bdsh, the Brain dead shell, currently " 132 print_wrapped_console( 133 "Don't panic!\n\n" 134 135 "This is Bdsh, the Brain dead shell, currently " 133 136 "the primary user interface to HelenOS. Bdsh allows you to enter " 134 137 "commands and supports history (Up, Down arrow keys), " 135 138 "line editing (Left Arrow, Right Arrow, Home, End, Backspace), " 136 139 "selection (Shift + movement keys), copy and paste (Ctrl-C, " 137 "Ctrl-V), similar to common desktop environments.\n\n" );138 139 printf("The most basic filesystem commands are Bdsh builtins. Type "140 "Ctrl-V), similar to common desktop environments.\n\n" 141 142 "The most basic filesystem commands are Bdsh builtins. Type " 140 143 "'help commands' [Enter] to see the list of Bdsh builtin commands. " 141 144 "Other commands are external executables located in the /app and " 142 145 "/srv directories. Type 'ls /app' [Enter] and 'ls /srv' [Enter] " 143 146 "to see their list. You can execute an external command simply " 144 "by entering its name (e.g. type 'tetris' [Enter]).\n\n" );145 146 printf("HelenOS has virtual consoles (VCs). You can switch between "147 "these using the F1-F11 keys.\n\n" );148 149 printf("This is but a small glimpse of what you can do with HelenOS. "147 "by entering its name (e.g. type 'tetris' [Enter]).\n\n" 148 149 "HelenOS has virtual consoles (VCs). You can switch between " 150 "these using the F1-F11 keys.\n\n" 151 152 "This is but a small glimpse of what you can do with HelenOS. " 150 153 "To learn more please point your browser to the HelenOS User's " 151 "Guide: http://trac.helenos.org/trac.fcgi/wiki/UsersGuide\n\n"); 154 "Guide: http://trac.helenos.org/trac.fcgi/wiki/UsersGuide\n\n", 155 ALIGN_LEFT); 152 156 } 153 157 -
uspace/lib/c/generic/str.c
rf41682c r22cf42d9 2 2 * Copyright (c) 2005 Martin Decky 3 3 * Copyright (c) 2008 Jiri Svoboda 4 * Copyright (c) 2011 Martin Sucha 4 5 * All rights reserved. 5 6 * … … 718 719 719 720 dest[dlen - 1] = '\0'; 721 } 722 723 /** Convert string to wide string. 724 * 725 * Convert string @a src to wide string. A new wide NULL-terminated 726 * string will be allocated on the heap. 727 * 728 * @param src Source string. 729 */ 730 wchar_t *str_to_awstr(const char *str) 731 { 732 size_t len = str_length(str); 733 wchar_t *wstr = calloc(len+1, sizeof(wchar_t)); 734 if (wstr == NULL) { 735 return NULL; 736 } 737 str_to_wstr(wstr, len+1, str); 738 return wstr; 720 739 } 721 740 -
uspace/lib/c/include/str.h
rf41682c r22cf42d9 83 83 extern char *wstr_to_astr(const wchar_t *src); 84 84 extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src); 85 extern wchar_t *str_to_awstr(const char *src); 85 86 86 87 extern char *str_chr(const char *str, wchar_t ch);
Note:
See TracChangeset
for help on using the changeset viewer.