Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4295 → Rev 4296

/branches/dd/uspace/app/bdsh/cmds/mod_cmds.c
64,7 → 64,7
return -2;
 
for (mod = modules; mod->name != NULL; mod++, i++) {
if (!strcmp(mod->name, command))
if (!str_cmp(mod->name, command))
return i;
}
 
81,7 → 81,7
return -1;
 
for(i=0; mod_aliases[i] != NULL; i+=2) {
if (!strcmp(mod_aliases[i], command))
if (!str_cmp(mod_aliases[i], command))
return 1;
}
 
97,7 → 97,7
return (char *)NULL;
 
for(i=0; mod_aliases[i] != NULL; i++) {
if (!strcmp(mod_aliases[i], command))
if (!str_cmp(mod_aliases[i], command))
return (char *)mod_aliases[++i];
i++;
}
/branches/dd/uspace/app/bdsh/cmds/modules/touch/touch.c
80,7 → 80,7
}
 
for (i = 1; i < argc; i ++) {
buff = strdup(argv[i]);
buff = str_dup(argv[i]);
dirp = opendir(buff);
if (dirp) {
cli_error(CL_ENOTSUP, "%s is a directory", buff);
/branches/dd/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
93,7 → 93,7
 
/* Its a good idea to allocate path, plus we (may) need a copy of
* path to tokenize if parents are specified */
if (NULL == (tmp = strdup(path))) {
if (NULL == (tmp = str_dup(path))) {
cli_error(CL_ENOMEM, "%s: path too big?", cmdname);
return 1;
}
149,7 → 149,7
while (dirs[i] != NULL) {
/* Sometimes make or scripts conjoin odd paths. Account for something
* like this: ../../foo/bar/../foo/foofoo/./bar */
if (!strcmp(dirs[i], "..") || !strcmp(dirs[i], ".")) {
if (!str_cmp(dirs[i], "..") || !str_cmp(dirs[i], ".")) {
if (0 != (chdir(dirs[i]))) {
cli_error(CL_EFAIL, "%s: impossible path: %s",
cmdname, path);
/branches/dd/uspace/app/bdsh/cmds/modules/help/help.c
107,7 → 107,7
}
 
if (argc == 3) {
if (!strcmp("extended", argv[2]))
if (!str_cmp("extended", argv[2]))
level = HELP_LONG;
else
level = HELP_SHORT;
/branches/dd/uspace/app/bdsh/cmds/modules/ls/ls.c
182,7 → 182,7
if (argc == 1)
getcwd(buff, PATH_MAX);
else
strncpy(buff, argv[1], PATH_MAX);
str_cpy(buff, PATH_MAX, argv[1]);
 
scope = ls_scope(buff);
 
/branches/dd/uspace/app/bdsh/cmds/modules/rm/rm.c
216,7 → 216,7
 
i = optind;
while (NULL != argv[i]) {
len = strlen(argv[i]) + 2;
len = str_size(argv[i]) + 2;
buff = (char *) realloc(buff, len);
if (buff == NULL) {
printf("rm: out of memory\n");
/branches/dd/uspace/app/bdsh/cmds/builtin_cmds.c
49,7 → 49,7
return -2;
 
for (cmd = builtins; cmd->name != NULL; cmd++, i++) {
if (!strcmp(cmd->name, command))
if (!str_cmp(cmd->name, command))
return i;
}
 
64,7 → 64,7
return -1;
 
for(i=0; builtin_aliases[i] != NULL; i+=2) {
if (!strcmp(builtin_aliases[i], command))
if (!str_cmp(builtin_aliases[i], command))
return 1;
}
 
79,7 → 79,7
return (char *)NULL;
 
for(i=0; builtin_aliases[i] != NULL; i++) {
if (!strcmp(builtin_aliases[i], command))
if (!str_cmp(builtin_aliases[i], command))
return (char *)builtin_aliases[++i];
i++;
}