tools/makefont
の編集
http://hrb.osask.jp/wiki/?tools/makefont
[
リロード
|
差分
|
単語検索
|
一覧
] [
編集
|
バックアップ
|
添付
]
-- 雛形とするページ --
A
Akkie
Athlon64X2
Clover
DAsoran
Falcon
FormatRule
FrontPage
Genesis
Help
I
InterWikiName
InterWikiSandBox
InterWikiテクニカル
Jormungand
K
Kebo
Kor_Lee_Hee_Rak
Leaf
Linux
Linux/wako_memo
MOIZ99
MW
MenuBar
OSC
PG_MANA
ReadersOS
RecentDeleted
SKYDASH
SandBox
Sero
Sigle
Source
Triangle_Ld.
Zxcvbnm
advance
advance/CPU
advance/FDC
advance/FPU
advance/NotHariMain
advance/QEMUVGA
advance/RTC
advance/blike
advance/cpu_reset
advance/driver
advance/driver/01
advance/driver/02
advance/families
advance/filesystem
advance/fwrite
advance/hddboot
advance/he86
advance/hints
advance/ipl
advance/kernel
advance/keycode
advance/osselect
advance/smaller1
advance/startup
advnace/smaller2
anzy
aotatsu
banbi-
bluedwarf
bo
bugs
challengers
cybozulabsyouth11
deskmanta
esb02b
faq
faq/advance
faq/asm
faq/c00-03
faq/c04-07
faq/c08-15
faq/c16-23
faq/c24-31
faq/make
faq/others
faq/qemu
guide
guide03
guide05
guide07
hikarupsp
imp_log/0000
imp_log/0001
imp_log/0002
imp_log/0003
impressions
index
k
killer_elf
kota
lea
lea/10_memory
lea/4_color
lea/idea
lea/terms
links
logs
logs/osa_hrb/comments0000
logs/osa_hrb/rumors0000
masa
members
message
mistakes
moge32
moppoi5168
notice
osdevjp
populars
prog_index
projects
q_and_a
q_and_a_2
qa_log/0000
qa_log/0001
qa_log/0002
qa_log/0003
qa_log/0004
qa_log/0005
qa_log/0006
qa_log/0007
qa_log/0008
qa_log/0009
quark
rankings
rule
sakamoto
sasaki
spc09
spcc_30min_os
tatsu
tools
tools/bim2hrb
tools/bin2obj
tools/cc1
tools/edimg
tools/gas2nask
tools/makefont
tools/nask
tools/obj2bim
tools/sjisconv
uchan
uho
updates
violations
wako
white
win64-bit
x
ytakano
ヘルプ
リックス
質問します
整形ルール
本は買ったぞ!持ってるぞ!
練習用ページ
* makefontについてのページ -(by [[K]], 2006.10.31) -半角フォントデータ生成ツール *** ソースプログラム #include <stdio.h> int main(int argc, char **argv) { FILE *fp0, *fp1; if (argc < 3) { puts("usage>makefont source.txt font.bin"); return 1; } fp0 = fopen(argv[1], "rb"); fp1 = fopen(argv[2], "wb"); if (fp0 == NULL) { puts("can't open input file."); return 2; } if (fp1 == NULL) { puts("can't open output file."); return 3; } do { char s[12]; int i; if (fgets(s, 12, fp0) != NULL && (s[0] == ' ' || s[0] == '*' || s[0] == '.')) { i = (s[0] == '*') << 7; i |= (s[1] == '*') << 6; i |= (s[2] == '*') << 5; i |= (s[3] == '*') << 4; i |= (s[4] == '*') << 3; i |= (s[5] == '*') << 2; i |= (s[6] == '*') << 1; i |= (s[7] == '*') ; fputc(i, fp1); } } while (!feof(fp0)); fclose(fp0); fclose(fp1); return 0; } * こめんと欄 #comment
タイムスタンプを変更しない
* makefontについてのページ -(by [[K]], 2006.10.31) -半角フォントデータ生成ツール *** ソースプログラム #include <stdio.h> int main(int argc, char **argv) { FILE *fp0, *fp1; if (argc < 3) { puts("usage>makefont source.txt font.bin"); return 1; } fp0 = fopen(argv[1], "rb"); fp1 = fopen(argv[2], "wb"); if (fp0 == NULL) { puts("can't open input file."); return 2; } if (fp1 == NULL) { puts("can't open output file."); return 3; } do { char s[12]; int i; if (fgets(s, 12, fp0) != NULL && (s[0] == ' ' || s[0] == '*' || s[0] == '.')) { i = (s[0] == '*') << 7; i |= (s[1] == '*') << 6; i |= (s[2] == '*') << 5; i |= (s[3] == '*') << 4; i |= (s[4] == '*') << 3; i |= (s[5] == '*') << 2; i |= (s[6] == '*') << 1; i |= (s[7] == '*') ; fputc(i, fp1); } } while (!feof(fp0)); fclose(fp0); fclose(fp1); return 0; } * こめんと欄 #comment
テキスト整形のルールを表示する