Skip to content

Commit

Permalink
Revert "Fix uninformative hp2ps error when the cmdline contains doubl…
Browse files Browse the repository at this point in the history
…e quotes"

This reverts commit 390df8b.
  • Loading branch information
bgamari committed Nov 24, 2018
1 parent 6a70acf commit bba2b9b
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 221 deletions.
30 changes: 8 additions & 22 deletions rts/ProfHeap.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,18 +360,6 @@ void endProfiling( void )
}
#endif /* !PROFILING */

static void
printEscapedString(const char* string)
{
for (const char* p = string; *p != '\0'; ++p) {
if (*p == '\"') {
// Escape every " as ""
fputc('"', hp_file);
}
fputc(*p, hp_file);
}
}

static void
printSample(bool beginSample, StgDouble sampleValue)
{
Expand Down Expand Up @@ -440,18 +428,16 @@ initHeapProfiling(void)
initEra( &censuses[era] );

/* initProfilingLogFile(); */
fprintf(hp_file, "JOB \"");
printEscapedString(prog_name);
fprintf(hp_file, "JOB \"%s", prog_name);

#if defined(PROFILING)
for (int i = 1; i < prog_argc; ++i) {
fputc(' ', hp_file);
printEscapedString(prog_argv[i]);
}
fprintf(hp_file, " +RTS");
for (int i = 0; i < rts_argc; ++i) {
fputc(' ', hp_file);
printEscapedString(rts_argv[i]);
{
int count;
for(count = 1; count < prog_argc; count++)
fprintf(hp_file, " %s", prog_argv[count]);
fprintf(hp_file, " +RTS");
for(count = 0; count < rts_argc; count++)
fprintf(hp_file, " %s", rts_argv[count]);
}
#endif /* PROFILING */

Expand Down
9 changes: 0 additions & 9 deletions testsuite/tests/hp2ps/Makefile

This file was deleted.

8 changes: 0 additions & 8 deletions testsuite/tests/hp2ps/T15904.hs

This file was deleted.

7 changes: 0 additions & 7 deletions testsuite/tests/hp2ps/T15904.stdout

This file was deleted.

1 change: 0 additions & 1 deletion testsuite/tests/hp2ps/all.T

This file was deleted.

Loading

0 comments on commit bba2b9b

Please sign in to comment.