mirror of
https://github.com/Alvin-Zilverstand/bob16.git
synced 2026-11-25 21:43:00 +01:00
e
This commit is contained in:
1 parent
78dd619293
commit
6dc841f956
109 files changed
+18192
-1907
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#include "bob.h"
|
||||
#include "bob_fs.h"
|
||||
#include "bob_string.h"
|
||||
|
||||
static void write_text(const char *text) {
|
||||
while (*text) bob_putc(*text++);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
char name[24];
|
||||
char number[12];
|
||||
int size;
|
||||
int kind;
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
kind = bob_file_list(i, name, 24, &size);
|
||||
if (kind < 0) continue;
|
||||
write_text(name);
|
||||
bob_putc(' ');
|
||||
bob_format_int(size, number, 12);
|
||||
write_text(number);
|
||||
bob_putc(' ');
|
||||
if (kind == 0) write_text("text");
|
||||
else if (kind == 3) write_text("native app");
|
||||
else write_text("program");
|
||||
bob_putc('\n');
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user