orbspace
@@ -66,7 +66,8 @@ | ||
66 | 66 | orbfs_init(); |
67 | 67 | |
68 | 68 | for (n = 4; n < argc;) { |
69 | - if (strncmp(argv[n], "+File", 4) == 0) { | |
69 | + if (strncmp(argv[n], "+File", 4) == 0 || | |
70 | + strncmp(argv[n], "+Func", 4) == 0) { | |
70 | 71 | for (m = ++n; m < argc && argv[m][0] != '+'; m++); |
71 | 72 | if ((fp = fopen(argv[n], "rb")) == 0) { |
72 | 73 | print_error(3); |
@@ -84,7 +85,8 @@ | ||
84 | 85 | if (orbfs_create(name, size, buf) != 0) { |
85 | 86 | print_error(3); |
86 | 87 | } |
87 | - if (orbfs_meta_add(name, "Type=File") != 0) { | |
88 | + if (orbfs_meta_add(name, | |
89 | + strncmp(argv[n - 1], "+File", 4) == 0 ? "Type=File" : "Type=Func") != 0) { | |
88 | 90 | print_error(3); |
89 | 91 | } |
90 | 92 | for (i = n + 1; i < m; i++) { |
@@ -29,10 +29,12 @@ | ||
29 | 29 | 0x0000-0x0003 サイズ |
30 | 30 | 0x0004-0x000f 名前 |
31 | 31 | 0x0010-0x01ff メタデータ |
32 | -0x0200- 512バイトにアラインされたデータ部分(一般タグの場合はファイルアドレスの羅列) | |
32 | +0x0200- 512バイトにアラインされたデータ部分 | |
33 | + (整理ボールの場合はファイルアドレスの羅列) | |
33 | 34 | |
34 | 35 | 1-3-1.メタデータの構造 |
35 | - -この部分は次のようなテキストデータである(先頭の" + "は引用文であることを示す) | |
36 | + -この部分は次のようなテキストデータである | |
37 | + (先頭の" + "は引用文であることを示しており、改行コードは0x0aのみ) | |
36 | 38 | + Type=File |
37 | 39 | + CreateDate=2010/1/1 |
38 | 40 | + CreateTime=12:29:06 |
@@ -52,3 +54,12 @@ | ||
52 | 54 | +File [orbspace][orbfs]orbspace\orbfs.c Author=tatsu Keyword=orbspace \ |
53 | 55 | +Func search.orb Color=0x0000ff |
54 | 56 | > |
57 | + | |
58 | + | |
59 | + | |
60 | +2.orbScript | |
61 | + | |
62 | +2-1.検索ボール(search.orb)の作成例 | |
63 | + + keyword = input(1) # 展開した後再入力可能、入力データをkeywordへ格納 | |
64 | + + collect(keyword, 1) # keywordに一致するものをボールの中へ集める、 | |
65 | + + ボールから離れても中身を維持し続ける |
@@ -8,7 +8,8 @@ | ||
8 | 8 | orbspace.img: $(MKORBFS) orbspace\ipl.bin Makefile |
9 | 9 | $(MKORBFS) orbspace.img 131072 orbspace\ipl.bin \ |
10 | 10 | +File orbspace\ipl.bin Author=tatsu Keyword=orbspace \ |
11 | - +File orbspace.txt Author=tatsu Keyword=orbspace | |
11 | + +File orbspace\ipl.nas Author=tatsu Keyword=orbspace \ | |
12 | + +Func search.orb Color=0xff0000 | |
12 | 13 | |
13 | 14 | clean: |
14 | 15 | make -C mkorbfs clean |