@@ -77,11 +77,11 @@ int main( int argc, char **argv )
77
77
name = map->answer ;
78
78
79
79
#ifdef Q_OS_WIN32
80
- _setmode (_fileno (stdin), _O_BINARY);
81
- _setmode (_fileno (stdout), _O_BINARY);
82
- setvbuf ( stdin, NULL , _IONBF, BUFSIZ);
80
+ _setmode ( _fileno ( stdin ), _O_BINARY );
81
+ _setmode ( _fileno ( stdout ), _O_BINARY );
82
+ setvbuf ( stdin, NULL , _IONBF, BUFSIZ );
83
83
// setting _IONBF on stdout works on windows correctly, data written immediately even without fflush(stdout)
84
- setvbuf ( stdout, NULL , _IONBF, BUFSIZ);
84
+ setvbuf ( stdout, NULL , _IONBF, BUFSIZ );
85
85
#endif
86
86
87
87
QFile stdinFile;
@@ -145,7 +145,7 @@ int main( int argc, char **argv )
145
145
{
146
146
break ;
147
147
}
148
- stdinStream >> byteArray;
148
+ stdinStream >> byteArray;
149
149
150
150
if ( byteArray.size () != expectedSize )
151
151
{
@@ -178,10 +178,10 @@ int main( int argc, char **argv )
178
178
G_put_raster_row ( cf, buf, grass_type );
179
179
180
180
#ifndef Q_OS_WIN
181
- // Because stdin is somewhere buffered on Windows (not clear if in QProcess or by Windows)
182
- // we cannot in QgsGrassImport wait for this because it hangs. Setting _IONBF on stdin does not help
183
- // and there is no flush() on QProcess.
184
- // OTOH, smaller stdin buffer is probably blocking QgsGrassImport so that the import can be canceled immediately.
181
+ // Because stdin is somewhere buffered on Windows (not clear if in QProcess or by Windows)
182
+ // we cannot in QgsGrassImport wait for this because it hangs. Setting _IONBF on stdin does not help
183
+ // and there is no flush() on QProcess.
184
+ // OTOH, smaller stdin buffer is probably blocking QgsGrassImport so that the import can be canceled immediately.
185
185
stdoutStream << ( bool )true ; // row written
186
186
stdoutFile.flush ();
187
187
#endif
0 commit comments