Ignore:
Timestamp:
2012-03-27T13:13:06Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9a6d8d
Parents:
9bdf1f2a
git-author:
Taylor Killian <> (2012-03-27 13:13:06)
git-committer:
Vojtech Horky <vojtechhorky@…> (2012-03-27 13:13:06)
Message:

Implement head and tail functionality in bdsh/cat (thx Taylor Killian)

This patch fixes a number of problems in the cat app. Most
importantly, it correctly displays characters at the end of the read
buffer, where previously multibyte characters were being rendered as
U_SPECIAL. It also implements the buffer size argument (-b) that the
—help mentions. The size of the buffer must be at least 4 though in
order to accommodate multibyte characters. Finally head (-H) and tail
(-t) were implemented as per —help.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cat/cat.h

    r9bdf1f2a rcc9f314  
    44/* Prototypes for the cat command, excluding entry points */
    55
    6 static unsigned int cat_file(const char *, size_t, bool);
     6static unsigned int cat_file(const char *, size_t, bool, off64_t, off64_t, bool);
    77
    88#endif /* CAT_H */
Note: See TracChangeset for help on using the changeset viewer.