MCPcopy Create free account
hub / github.com/carbonengine/trinity / PrintOutOfDateFiles

Function PrintOutOfDateFiles

shadercompiler/ModifiedTime.cpp:166–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void PrintOutOfDateFiles( size_t workerCount )
167{
168 WorkQueue<HashCheckArguments, decltype( &CheckHash )> workQueue( workerCount, &CheckHash );
169
170 char buffer[4096];
171 while( !feof( stdin ) )
172 {
173 if( !fgets( buffer, sizeof( buffer ), stdin ) )
174 {
175 break;
176 }
177
178 HashCheckArguments query;
179
180 char* line = buffer;
181 auto next = GetNextWord( line );
182 query.sourcePath = line;
183 line = next;
184 next = GetNextWord( line );
185 query.outputPath = line;
186 line = next;
187
188 while( *line )
189 {
190 Macro macro;
191 next = GetNextWord( line );
192 if( *next == 0 )
193 {
194 printf( "Invalid input string near %s\n", line );
195 fflush( stdout );
196 return;
197 }
198 macro.name = line;
199 line = next;
200 next = GetNextWord( line );
201 macro.value = line;
202 query.defines.push_back( macro );
203 line = next;
204 }
205
206 workQueue.Put( query );
207 }
208
209 workQueue.Join();
210
211 for( auto it = s_modifiedOutputs.begin(); it != s_modifiedOutputs.end(); ++it )
212 {
213 puts( it->c_str() );
214 puts( "\n" );
215 }
216}

Callers 1

mainFunction · 0.85

Calls 5

GetNextWordFunction · 0.85
PutMethod · 0.45
JoinMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected