#include #include #include void main() { struct file *f = open_file("SYS/STARTUP.RC"); if (!f) { tell_user_sz("\nCould not open SYS/STARTUP.RC"); return; } char buf[1024]; char *bufp = buf; while (read_from_file(f, 1, bufp)) { if (*bufp == '\n') { if (bufp == buf) continue; *bufp = '\0'; try_run_command(buf); bufp = buf; } else ++bufp; } if (bufp != buf) { *bufp = '\0'; try_run_command(buf); } close_file(f); }