view lib/net.c @ 1395:5149632b0d07 draft

Add utf8 support to ls -C. Use wcwidth() instead of strlen(), and extend the -q substitution to also whiteout nonprintable characters that are nonparseable utf8 snippets.
author Rob Landley <rob@landley.net>
date Sun, 20 Jul 2014 16:34:36 -0500
parents e11684e3bbc5
children
line wrap: on
line source

#include "toys.h"

int xsocket(int domain, int type, int protocol)
{
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;
}