summaryrefslogtreecommitdiff
path: root/apps/plugins/iriverify.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/iriverify.c')
-rw-r--r--apps/plugins/iriverify.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c
index eaaec4b..546601b 100644
--- a/apps/plugins/iriverify.c
+++ b/apps/plugins/iriverify.c
@@ -75,42 +75,42 @@ static int write_file(void)
buf_ptr = stringbuffer;
str_begin = stringbuffer;
do {
- /* Transform slashes into backslashes */
+ /* Transform slashes into backslashes */
if(*buf_ptr == '/')
- *buf_ptr = '\\';
-
- if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
- /* We have no complete string ? It's only a leading \n or \r ? */
- if (!str_begin)
- continue;
-
- /* Terminate string */
- *buf_ptr = 0;
-
- /* Write our new string */
- rc = rb->write(fd, str_begin, rb->strlen(str_begin));
- if(rc < 0) {
- rb->close(fd);
- return 10 * rc - 2;
- }
- /* Write CR/LF */
- rc = rb->write(fd, crlf, 2);
- if(rc < 0) {
- rb->close(fd);
- return 10 * rc - 3;
- }
-
- /* Reset until we get a new line */
- str_begin = NULL;
-
- }
- else {
- /* We start a new line here */
- if (!str_begin)
- str_begin = buf_ptr;
- }
-
- /* Next char, until ... */
+ *buf_ptr = '\\';
+
+ if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
+ /* We have no complete string ? It's only a leading \n or \r ? */
+ if (!str_begin)
+ continue;
+
+ /* Terminate string */
+ *buf_ptr = 0;
+
+ /* Write our new string */
+ rc = rb->write(fd, str_begin, rb->strlen(str_begin));
+ if(rc < 0) {
+ rb->close(fd);
+ return 10 * rc - 2;
+ }
+ /* Write CR/LF */
+ rc = rb->write(fd, crlf, 2);
+ if(rc < 0) {
+ rb->close(fd);
+ return 10 * rc - 3;
+ }
+
+ /* Reset until we get a new line */
+ str_begin = NULL;
+
+ }
+ else {
+ /* We start a new line here */
+ if (!str_begin)
+ str_begin = buf_ptr;
+ }
+
+ /* Next char, until ... */
} while(buf_ptr++ < stringbuffer + readsize);
rb->close(fd);