GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
unctrl.c
Go to the documentation of this file.
1 
17 #include <stdio.h>
18 #include <grass/gis.h>
19 
20 
34 char *G_unctrl(int c)
35 {
36  static char buf[20];
37 
38  if (c < ' ')
39  sprintf(buf, "ctrl-%c", c | 0100);
40  else if (c < 0177)
41  sprintf(buf, "%c", c);
42  else if (c == 0177)
43  sprintf(buf, "DEL/RUB");
44  else
45  sprintf(buf, "Mctrl-%c", (c & 77) | 0100);
46 
47  return buf;
48 }