Subversion Repositories HelenOS

Rev

Rev 3411 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3411 Rev 3413
Line 57... Line 57...
57
    { "more", no_argument, 0, 'm' },
57
    { "more", no_argument, 0, 'm' },
58
    { 0, 0, 0, 0 }
58
    { 0, 0, 0, 0 }
59
};
59
};
60
 
60
 
61
/* Dispays help for cat in various levels */
61
/* Dispays help for cat in various levels */
62
void * help_cmd_cat(unsigned int level)
62
void help_cmd_cat(unsigned int level)
63
{
63
{
64
    if (level == HELP_SHORT) {
64
    if (level == HELP_SHORT) {
65
        printf("`%s' shows the contents of files\n", cmdname);
65
        printf("`%s' shows the contents of files\n", cmdname);
66
    } else {
66
    } else {
67
        help_cmd_cat(HELP_SHORT);
67
        help_cmd_cat(HELP_SHORT);
Line 76... Line 76...
76
        "  -m, --more       Pause after each screen full\n"
76
        "  -m, --more       Pause after each screen full\n"
77
        "Currently, %s is under development, some options don't work.\n",
77
        "Currently, %s is under development, some options don't work.\n",
78
        cmdname, cmdname);
78
        cmdname, cmdname);
79
    }
79
    }
80
 
80
 
81
    return CMD_VOID;
81
    return;
82
}
82
}
83
 
83
 
84
static unsigned int cat_file(const char *fname, size_t blen)
84
static unsigned int cat_file(const char *fname, size_t blen)
85
{
85
{
86
    int fd, bytes = 0, count = 0, reads = 0;
86
    int fd, bytes = 0, count = 0, reads = 0;
Line 125... Line 125...
125
 
125
 
126
    return 0;
126
    return 0;
127
}
127
}
128
 
128
 
129
/* Main entry point for cat, accepts an array of arguments */
129
/* Main entry point for cat, accepts an array of arguments */
130
int * cmd_cat(char **argv)
130
int cmd_cat(char **argv)
131
{
131
{
132
    unsigned int argc, i, ret = 0, buffer = 0;
132
    unsigned int argc, i, ret = 0, buffer = 0;
133
    int c, opt_ind;
133
    int c, opt_ind;
134
 
134
 
135
    argc = cli_count_args(argv);
135
    argc = cli_count_args(argv);