9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

needsrcquote.c (151B)


      1 #include <u.h>
      2 #include <libc.h>
      3 
      4 int
      5 needsrcquote(int c)
      6 {
      7 	if(c <= ' ')
      8 		return 1;
      9 	if(strchr("`^#*[]=|\\?${}()'<>&;", c))
     10 		return 1;
     11 	return 0;
     12 }