X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=compat%2Fisblank.c;fp=compat%2Fisblank.c;h=083d805d6d3ab34486bc14b1c7f403c8ac6695e6;hb=7a01b10fee894dea7ecb3252886912eab41e9693;hp=0000000000000000000000000000000000000000;hpb=f3530d8198251b72d01da9a07b1fa518446ec0f0;p=debian%2Fsudo diff --git a/compat/isblank.c b/compat/isblank.c new file mode 100644 index 0000000..083d805 --- /dev/null +++ b/compat/isblank.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2008, 2010-2011 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include + +#include + +#include "missing.h" + +#undef isblank +int +isblank(int ch) +{ + return ch == ' ' || ch == '\t'; +}