diff options
Diffstat (limited to 'apps/plugins/iriverify.c')
-rw-r--r-- | apps/plugins/iriverify.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c index eaaec4b1e1..546601baad 100644 --- a/apps/plugins/iriverify.c +++ b/apps/plugins/iriverify.c | |||
@@ -75,42 +75,42 @@ static int write_file(void) | |||
75 | buf_ptr = stringbuffer; | 75 | buf_ptr = stringbuffer; |
76 | str_begin = stringbuffer; | 76 | str_begin = stringbuffer; |
77 | do { | 77 | do { |
78 | /* Transform slashes into backslashes */ | 78 | /* Transform slashes into backslashes */ |
79 | if(*buf_ptr == '/') | 79 | if(*buf_ptr == '/') |
80 | *buf_ptr = '\\'; | 80 | *buf_ptr = '\\'; |
81 | 81 | ||
82 | if((*buf_ptr == '\r') || (*buf_ptr == '\n')) { | 82 | if((*buf_ptr == '\r') || (*buf_ptr == '\n')) { |
83 | /* We have no complete string ? It's only a leading \n or \r ? */ | 83 | /* We have no complete string ? It's only a leading \n or \r ? */ |
84 | if (!str_begin) | 84 | if (!str_begin) |
85 | continue; | 85 | continue; |
86 | 86 | ||
87 | /* Terminate string */ | 87 | /* Terminate string */ |
88 | *buf_ptr = 0; | 88 | *buf_ptr = 0; |
89 | 89 | ||
90 | /* Write our new string */ | 90 | /* Write our new string */ |
91 | rc = rb->write(fd, str_begin, rb->strlen(str_begin)); | 91 | rc = rb->write(fd, str_begin, rb->strlen(str_begin)); |
92 | if(rc < 0) { | 92 | if(rc < 0) { |
93 | rb->close(fd); | 93 | rb->close(fd); |
94 | return 10 * rc - 2; | 94 | return 10 * rc - 2; |
95 | } | 95 | } |
96 | /* Write CR/LF */ | 96 | /* Write CR/LF */ |
97 | rc = rb->write(fd, crlf, 2); | 97 | rc = rb->write(fd, crlf, 2); |
98 | if(rc < 0) { | 98 | if(rc < 0) { |
99 | rb->close(fd); | 99 | rb->close(fd); |
100 | return 10 * rc - 3; | 100 | return 10 * rc - 3; |
101 | } | 101 | } |
102 | 102 | ||
103 | /* Reset until we get a new line */ | 103 | /* Reset until we get a new line */ |
104 | str_begin = NULL; | 104 | str_begin = NULL; |
105 | 105 | ||
106 | } | 106 | } |
107 | else { | 107 | else { |
108 | /* We start a new line here */ | 108 | /* We start a new line here */ |
109 | if (!str_begin) | 109 | if (!str_begin) |
110 | str_begin = buf_ptr; | 110 | str_begin = buf_ptr; |
111 | } | 111 | } |
112 | 112 | ||
113 | /* Next char, until ... */ | 113 | /* Next char, until ... */ |
114 | } while(buf_ptr++ < stringbuffer + readsize); | 114 | } while(buf_ptr++ < stringbuffer + readsize); |
115 | 115 | ||
116 | rb->close(fd); | 116 | rb->close(fd); |