2012-08-25から1日間の記事一覧

基数変換

コマンドラインで10進、16進の変換を行う。 /* * radixtrans.c * * hex -> dewcimal * decimal -> hex * */ #include <stdio.h> /*----------------------------------------------------------*/ main(int argc, char *argv[]) { char str[32]; int number; while(1)</stdio.h>…

HexDump

/* * hexdump.c */ #include <stdio.h> /*----------------------------------------------------------*/ void yydump(FILE *yyin, int length) { int address = 0; int d; char data[17]; int i; data[16] = 0; /* for string terminator */ for(;;){ printf("%05X </stdio.h>…

X Windowのプログラムサンプル

X Windowのプログラムサンプル /* * X Window sample program * * To create make file using X lib, * Create Imakefile and enter below. * $ xmkmf * Then automatically Makefile is created. * * To build target with debug information, * enter belo…