CouchDB
  1. CouchDB
  2. COUCHDB-1329

couch_js/utf8.h:19:7: error: no newline at end of file

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.2, 1.2.1, 1.3
    • Component/s: JavaScript View Server
    • Labels:
      None
    • Environment:

      likely anybody compiling with gcc -pedantic or -Werror

      Description

      ISO C 1999 requires a newline at the end of every non-blank source file:

      http://c0x.coding-guidelines.com/5.1.1.2.html vis
      "123 A source file that is not empty shall end in a new-line
      character, which shall not be immediately preceded by a backslash
      character before any such splicing takes place. "

      Thanks Mike Kimber for reporting this bug.

        Issue Links

          Activity

          Hide
          Noah Slater added a comment -

          It's better than that.

          POSIX defines a text file as:

          "A file that contains characters organized into zero or more lines[...]"

          And a line as:

          "A sequence of zero or more non- <newline> characters plus a terminating <newline> character."

          And to really drive it home, it defines an incomplete line as:

          "A sequence of one or more non- <newline> characters at the end of the file."

          Strictly speaking, if the file does not end in a newline, it's a binary file, as far as POSIX is concerned.

          Just sayin', yo.

          cf. http://pubs.opengroup.org/onlinepubs/9699919799/

          Show
          Noah Slater added a comment - It's better than that. POSIX defines a text file as: "A file that contains characters organized into zero or more lines [...] " And a line as: "A sequence of zero or more non- <newline> characters plus a terminating <newline> character." And to really drive it home, it defines an incomplete line as: "A sequence of one or more non- <newline> characters at the end of the file." Strictly speaking, if the file does not end in a newline, it's a binary file, as far as POSIX is concerned. Just sayin', yo. cf. http://pubs.opengroup.org/onlinepubs/9699919799/

            People

            • Assignee:
              Unassigned
              Reporter:
              Dave Cottlehuber
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development