OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [libiberty/] [testsuite/] [test-expandargv.c] - Diff between revs 21 and 161

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 21 Rev 161
Line 187... Line 187...
void
void
writeout_test (int test, const char * test_data)
writeout_test (int test, const char * test_data)
{
{
  char filename[256];
  char filename[256];
  FILE *fd;
  FILE *fd;
  size_t len;
  size_t len, sys_fwrite;
  char * parse;
  char * parse;
 
 
  /* Unique filename per test */
  /* Unique filename per test */
  sprintf (filename, FILENAME_PATTERN, test);
  sprintf (filename, FILENAME_PATTERN, test);
  fd = fopen (filename, "w");
  fd = fopen (filename, "w");
Line 206... Line 206...
 
 
  memcpy (parse, test_data, sizeof (char) * (len + 1));
  memcpy (parse, test_data, sizeof (char) * (len + 1));
  /* Run all possible replaces */
  /* Run all possible replaces */
  run_replaces (parse);
  run_replaces (parse);
 
 
  fwrite (parse, len, sizeof (char), fd);
  sys_fwrite = fwrite (parse, sizeof (char), len, fd);
 
  if (sys_fwrite != len)
 
    fatal_error (__LINE__, "Failed to write to test file.", errno);
 
 
  free (parse);
  free (parse);
  fclose (fd);
  fclose (fd);
}
}
 
 
/* erase_test:
/* erase_test:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.