News for hackers. Stuff that matters.
Re:Unix V5, OpenBSD, Plan 9, FreeBSD, and GNU implementation... by Someone on Tuesday July 19, 2011 @06:16PM (#2783376)
If speed is important, why the copying of the data? Only 'slightly' non-portable:

  int main (int argc, const char * argv[])
  {
    for( int i = 1; i < argc; ++i)
    {
        ((char *)argv[i])[-1] = ' ';
    }
    size_t len = strlen(argv[argc - 1]);
    ((char *)argv[argc - 1])[len] = '\n';
    write(1, argv[1], argv[argc - 1] - argv[1] + len + 1);
    return EXIT_SUCCESS;
  }

There are no comments on this comment yet.