char *opened = NULL;
char buffer[8096] = {0,};
long line = 0;
-
+
php_stream *stream = NULL;
if (VCWD_STAT(filename, &st) == FAILURE) {
}
while (php_stream_gets(stream, buffer, sizeof(buffer)) != NULL) {
+ long linelen = strlen(buffer);
+
++line;
if (!offset || offset <= line) {
phpdbg_write(">%05ld: %s", line, buffer);
}
}
+
+ if (buffer[linelen - 1] != '\n') {
+ phpdbg_write("\n");
+ }
}
-
- if ((count + (offset-1)) == line)
+
+ if ((count + (offset - 1)) == line)
break;
}