+ if (f != NULL) {\r
+ p = fgets(buff, sizeof(buff), f);\r
+ if (p == NULL)\r
+ break;\r
+ }\r
+ else {\r
+ if (*builtin == 0)\r
+ break;\r
+ for (s = builtin; *s != 0 && *s != '\n'; s++)\r
+ ;\r
+ while (*s == '\n')\r
+ s++;\r
+ tmp = s - builtin;\r
+ if (tmp > sizeof(buff) - 1)\r
+ tmp = sizeof(buff) - 1;\r
+ memcpy(buff, builtin, tmp);\r
+ buff[tmp] = 0;\r
+ p = buff;\r
+ builtin = s;\r
+ }\r
+\r