Mercurial > hg > toybox
view lib/xregcomp.c @ 689:c29e69a0e85e
On 32 bit platforms %ld doesn't match uint64_t, so do long long and %lld (rather than deal with verbose PRIu64 nonsense).
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 10 Nov 2012 18:24:14 -0600 |
parents | 86e2bdb2ad66 |
children | 786841fdb1e0 |
line wrap: on
line source
/* vi: set ts=4: * Call regcomp() and handle errors. * * Copyright 2007 Rob Landley <rob@landley.net> * * This is a separate file so environments that haven't got regular expression * support can configure this out and avoid a build break. */ #include "toys.h" #include "xregcomp.h" void xregcomp(regex_t *preg, char *regex, int cflags) { int rc = regcomp(preg, regex, cflags); if (rc) { char msg[256]; regerror(rc, preg, msg, 255); msg[255]=0; error_exit("xregcomp: %s", msg); } }