[haiku-bugs] Re: [Haiku] #12609: /bin/mail doesn't handle piped in data

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Mon, 29 Feb 2016 20:19:01 -0000

#12609: /bin/mail doesn't handle piped in data
-----------------------------------------------+---------------------------
   Reporter:  AGMS                             |      Owner:  nobody
       Type:  bug                              |     Status:  new
   Priority:  normal                           |  Milestone:  Unscheduled
  Component:  Applications/Command Line Tools  |    Version:
 Resolution:                                   |  R1/Development
 Blocked By:                                   |   Keywords:  /bin/mail
Has a Patch:  1                                |   Blocking:
                                               |   Platform:  All
-----------------------------------------------+---------------------------

Comment (by axeld):

 Thanks! There are a number of minor (coding style) issues that you might
 want to fix to simplify accepting that patch:
 * We use sentence casing, ie. "No subject" over "No Subject"
 * No space after isatty
 * The printf in the following if-clause is a multi-line term, and must
 therefore be enclosed in curly braces
 * {{{BString body}}} automatically creates an empty string, so {{{BString
 body = ""}}} is superfluous
 * The comment after `break` should be on its own line like this:
 {{{
 if (fgets(line, sizeof(line), stdin) == NULL) {
     // End of file or an error happened.
     break;
 }
 }}}
  Extra points for actually checking for errors there, and reporting them
 :-)

--
Ticket URL: <https://dev.haiku-os.org/ticket/12609#comment:3>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: