Changeset 92fd52d7 in mainline for uspace/app/bdsh
- Timestamp:
- 2009-04-09T21:16:50Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7afb4a5
- Parents:
- a2c58f6
- Location:
- uspace/app/bdsh
- Files:
-
- 7 edited
-
cmds/builtin_cmds.c (modified) (3 diffs)
-
cmds/mod_cmds.c (modified) (3 diffs)
-
cmds/modules/help/help.c (modified) (1 diff)
-
cmds/modules/mkdir/mkdir.c (modified) (1 diff)
-
cmds/modules/rm/rm.c (modified) (1 diff)
-
exec.c (modified) (2 diffs)
-
input.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtin_cmds.c
ra2c58f6 r92fd52d7 50 50 51 51 for (cmd = builtins; cmd->name != NULL; cmd++, i++) { 52 if (!str cmp(cmd->name, command))52 if (!str_cmp(cmd->name, command)) 53 53 return i; 54 54 } … … 65 65 66 66 for(i=0; builtin_aliases[i] != NULL; i+=2) { 67 if (!str cmp(builtin_aliases[i], command))67 if (!str_cmp(builtin_aliases[i], command)) 68 68 return 1; 69 69 } … … 80 80 81 81 for(i=0; builtin_aliases[i] != NULL; i++) { 82 if (!str cmp(builtin_aliases[i], command))82 if (!str_cmp(builtin_aliases[i], command)) 83 83 return (char *)builtin_aliases[++i]; 84 84 i++; -
uspace/app/bdsh/cmds/mod_cmds.c
ra2c58f6 r92fd52d7 65 65 66 66 for (mod = modules; mod->name != NULL; mod++, i++) { 67 if (!str cmp(mod->name, command))67 if (!str_cmp(mod->name, command)) 68 68 return i; 69 69 } … … 82 82 83 83 for(i=0; mod_aliases[i] != NULL; i+=2) { 84 if (!str cmp(mod_aliases[i], command))84 if (!str_cmp(mod_aliases[i], command)) 85 85 return 1; 86 86 } … … 98 98 99 99 for(i=0; mod_aliases[i] != NULL; i++) { 100 if (!str cmp(mod_aliases[i], command))100 if (!str_cmp(mod_aliases[i], command)) 101 101 return (char *)mod_aliases[++i]; 102 102 i++; -
uspace/app/bdsh/cmds/modules/help/help.c
ra2c58f6 r92fd52d7 108 108 109 109 if (argc == 3) { 110 if (!str cmp("extended", argv[2]))110 if (!str_cmp("extended", argv[2])) 111 111 level = HELP_LONG; 112 112 else -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
ra2c58f6 r92fd52d7 150 150 /* Sometimes make or scripts conjoin odd paths. Account for something 151 151 * like this: ../../foo/bar/../foo/foofoo/./bar */ 152 if (!str cmp(dirs[i], "..") || !strcmp(dirs[i], ".")) {152 if (!str_cmp(dirs[i], "..") || !str_cmp(dirs[i], ".")) { 153 153 if (0 != (chdir(dirs[i]))) { 154 154 cli_error(CL_EFAIL, "%s: impossible path: %s", -
uspace/app/bdsh/cmds/modules/rm/rm.c
ra2c58f6 r92fd52d7 217 217 i = optind; 218 218 while (NULL != argv[i]) { 219 len = str len(argv[i]) + 2;219 len = str_size(argv[i]) + 2; 220 220 buff = (char *) realloc(buff, len); 221 221 if (buff == NULL) { -
uspace/app/bdsh/exec.c
ra2c58f6 r92fd52d7 72 72 char *path[PATH_MAX]; 73 73 int n = 0, i = 0; 74 size_t x = str len(cmd) + 2;74 size_t x = str_size(cmd) + 2; 75 75 76 76 found = (char *)malloc(PATH_MAX); … … 86 86 path[n] = strtok(path_tok, PATH_DELIM); 87 87 while (NULL != path[n]) { 88 if ((str len(path[n]) + x ) > PATH_MAX) {88 if ((str_size(path[n]) + x ) > PATH_MAX) { 89 89 cli_error(CL_ENOTSUP, 90 90 "Segment %d of path is too large, search ends at segment %d", -
uspace/app/bdsh/input.c
ra2c58f6 r92fd52d7 147 147 { 148 148 char line[INPUT_MAX]; 149 size_t len = 0;150 149 151 150 console_set_style(STYLE_EMPHASIS); … … 154 153 155 154 read_line(line, INPUT_MAX); 156 len = strlen(line);157 155 /* Make sure we don't have rubbish or a C/R happy user */ 158 if ( len == 0 || line[0] == '\n')156 if (str_cmp(line, "") == 0 || str_cmp(line, "\n") == 0) 159 157 return; 160 158 usr->line = strdup(line);
Note:
See TracChangeset
for help on using the changeset viewer.
