int main(int argc, char **argv) { uint l; if (argc != 7) { printf("invalid argument. \n"); return 0; } ff_init(); sscanf(argv[1], "%lf", &neu[0][0].x); sscanf(argv[2], "%lf", &neu[1][0].x); sscanf(argv[3], "%lf", &neu[2][0].x); sscanf(argv[4], "%lf", &neu[3][0].x); sscanf(argv[5], "%lf", &neu[4][0].x); sscanf(argv[6], "%lf", &neu[5][0].x); printf("[%.0lf %.0lf %.0lf %.0lf %.0lf %.0lf] -> ", neu[0][0].x, neu[1][0].x, neu[2][0].x, neu[3][0].x, neu[4][0].x, neu[5][0].x); for (l = 0; l < LAYER; l++) ff_layer_out(l); printf("%lf\n", neu[0][LAYER].x); return 0; }
int main() { int d_index = 0; int b_index = 0; struct vandermond_matrix *matrix; ff_init(); matrix = get_vandermond_matrix(16); print_vandermond_matrix(); printf("-----------------------------------------------\n"); for (d_index = 0; d_index < 257; d_index++) { for (b_index = 0; b_index < 16; b_index++) { printf("%d\t", matrix->get(d_index, b_index)); } printf("\n"); } return 0; }
int __kinit__ fatfs_init(void) { int err; SUBSYS_DEP(fs_init); SUBSYS_DEP(proc_init); SUBSYS_INIT("fatfs"); fatfs_sb_arr = kcalloc(configFATFS_MAX_MOUNTS, sizeof(struct fatfs_sb *)); if (!fatfs_sb_arr) return -ENOMEM; fs_inherit_vnops(&fatfs_vnode_ops, &nofs_vnode_ops); err = ff_init(); if (err) return err; FS_GIANT_INIT(&fatfs_fs.fs_giant); fs_register(&fatfs_fs); return 0; }
int main() { test_open(); // Initialize the FS FAT16 fat; ff_init(&test, &fat); FFILE file; ff_root(&fat, &file); char str[12]; printf("Disk label: %s\n", ff_disk_label(&fat, str)); do { if (!ff_is_regular(&file)) continue; printf("File name: %s, %c, %d B, @ 0x%x\n", ff_dispname(&file, str), file.type, file.size, file.clu_start); } while (ff_next(&file)); // fat16_root(&fat, &file); // if (fat16_mkfile(&file, "slepice8.ini")) // { // printf("created.\n"); // char* moo = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32."; // fat16_write(&file, moo, strlen(moo)); // } // if (fat16_find(&file, "slepice2.ini")) // { // printf("Found.\n"); // char m[1000000]; // fat16_read(&file, m, file.size); // m[file.size] = 0; // printf("%s\n", m); //// char* moo = "\n\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32.Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32.Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32.Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32."; //// fat16_seek(&file, file.size); //// fat16_write(&file, moo, strlen(moo)); // } // if (fat16_find(&file, "banana2.exe")) // { // printf("Found.\n"); // printf("Deleted? %d\n", fat16_delete(&file)); // } test_close(); return 0; }