S
Sam Halliday
i want to have a function which can print the printable form (possibly a 2
character string) of a character on UNIX like systems. for example, if i were to
pass the ascii value '\3', i would like it printed "^C".
there is a file called charset.c in the distribution of less
[ftp://ftp.gnu.org/gnu/less/less-382.tar.gz] which achieves this, but it is
quite long winded and i do not wish to have to copy all the relevant code, as it
is longer than my program which requires this functionality.
i was wondering if anyone knew of a much smaller implementation... preferably
already in a GNU library?
character string) of a character on UNIX like systems. for example, if i were to
pass the ascii value '\3', i would like it printed "^C".
there is a file called charset.c in the distribution of less
[ftp://ftp.gnu.org/gnu/less/less-382.tar.gz] which achieves this, but it is
quite long winded and i do not wish to have to copy all the relevant code, as it
is longer than my program which requires this functionality.
i was wondering if anyone knew of a much smaller implementation... preferably
already in a GNU library?