cpitf.c, sharedspice.c, add debug output by defining OUTDEBUG preprocessor flag

This commit is contained in:
h_vogt 2016-10-30 00:27:12 +02:00 committed by rlar
parent e086e60868
commit 896064c8b4
2 changed files with 10 additions and 0 deletions

View File

@ -264,6 +264,9 @@ ft_cpinit(void)
/* jump over leading spaces */
for (copys = s = cp_tildexpand(Lib_Path); copys && *copys; ) {
s = skip_ws(s);
#ifdef OUTDEBUG
printf("cpitf.c, spinit path is %s\n", s);
#endif
/* copy s into buf until space is seen, r is the actual position */
for (r = buf; *s && !isspace_c(*s); r++, s++)
*r = *s;

View File

@ -1177,6 +1177,13 @@ sh_fputsll(const char *input, FILE* outf)
if (noprintfwanted)
return -1;
#ifdef OUTDEBUG
/* debug: print into file */
FILE *fd = fopen("ng-string-out.txt", "a");
fprintf(fd, "%s", input);
fclose(fd);
#endif
if (outf == stderr) {
if (!outstringerr)
delstring = outstringerr = copy(input);