diff options
author | epochqwert <epoch@hacking.allowed.org> | 2015-05-28 07:16:46 -0500 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2015-05-28 07:16:46 -0500 |
commit | 05f18ac5c65755e1dde4d4bd44575011310bc648 (patch) | |
tree | fc8120feb1a68a205127ea3219ae0e9b32e5e629 /src/bin/fontdump.c | |
parent | bab39151c44f47c296a53f32f378b948d6d11cef (diff) | |
download | misc-05f18ac5c65755e1dde4d4bd44575011310bc648.tar.gz misc-05f18ac5c65755e1dde4d4bd44575011310bc648.zip |
added quot to the html entities programs
cat fontfile.808 | fontdump > editme.font ; cat editme.font | fontbuild.sh > filefile2.808
the fontstuff is for text-mode fonts for NetBSD. at least. can probably be used for any binary files if you want. only support for 8x8 fonts in build atm.
mime-type got a fix for css
Diffstat (limited to 'src/bin/fontdump.c')
-rw-r--r-- | src/bin/fontdump.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bin/fontdump.c b/src/bin/fontdump.c new file mode 100644 index 0000000..eb481d0 --- /dev/null +++ b/src/bin/fontdump.c @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc,char *argv[]) { + int i,j,k; + int height=argc>1?atoi(argv[1]):8; + char *map=malloc(height); + for(i=0;i<256;i++) { + printf("0x%02x (%3d) '%c'\n",i,i,isprint(i)?i:'?'); + read(0,map,height); + for(j=0;j<height;j++) { + for(k=7;k>=0;k--) { + printf("%c",(map[j]>>k&1)?'#':' '); + } + printf("\n"); + } + } + return 0; +} |