MCPcopy Create free account
hub / github.com/apache/nuttx / filecmp

Function filecmp

tools/configure.c:417–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417static bool filecmp(const char *f1, const char *f2)
418{
419 FILE *stream1;
420 FILE *stream2;
421 char ch1;
422 char ch2;
423
424 stream1 = fopen(f1, "r");
425 stream2 = fopen(f2, "r");
426
427 if (stream1 == NULL || stream2 == NULL)
428 {
429 return false;
430 }
431
432 do
433 {
434 ch1 = fgetc(stream1);
435 ch2 = fgetc(stream2);
436
437 if (ch1 != ch2)
438 {
439 return false;
440 }
441 }
442 while (ch1 != EOF && ch2 != EOF);
443
444 fclose(stream1);
445 fclose(stream2);
446
447 return true;
448}
449
450static bool check_directory(const char *directory)
451{

Callers 1

check_configuredFunction · 0.85

Calls 3

fopenFunction · 0.85
fgetcFunction · 0.85
fcloseFunction · 0.85

Tested by

no test coverage detected