OSSP CVS Repository

ossp - Check-in [3445]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3445
Date: 2003-Jun-23 13:27:53 (local)
2003-Jun-23 11:27:53 (UTC)
User:ms
Branch:
Comment: Do not remove eval mode temp files when the debugging option is active.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_const.h      1.25 -> 1.26     4 inserted, 3 deleted
ossp-pkg/rc/rc_proc.c      1.46 -> 1.47     8 inserted, 1 deleted

ossp-pkg/rc/rc_const.h 1.25 -> 1.26

--- rc_const.h   2003/06/18 14:35:29     1.25
+++ rc_const.h   2003/06/23 11:27:54     1.26
@@ -151,8 +151,9 @@
 #define RC_DEF_PRI    200                       /* Section priority value */
 
 /* Handling temporary and output during evaluation mode */
-#define RC_EVL_TMP    "rc.XXXXXX"                            /* Temporary file template */
-#define RC_EVL_SUF    ".tmp"                                 /* Temporary file suffix   */
-#define RC_EVL_OUT    ". %s; rm -f %s 2>/dev/null || true\n" /* Command line output     */
+#define RC_EVL_TMP    "rc.XXXXXX"                            /* Temporary file template   */
+#define RC_EVL_SUF    ".tmp"                                 /* Temporary file suffix     */
+#define RC_EVL_OUT    ". %s; rm -f %s 2>/dev/null || true\n" /* Command line output       */
+#define RC_EVL_DBG    ". %s\n"                               /* Command line debug output */
 
 #endif /* __OSSPRC_CONST_H__ */


ossp-pkg/rc/rc_proc.c 1.46 -> 1.47

--- rc_proc.c    2003/06/18 14:35:29     1.46
+++ rc_proc.c    2003/06/23 11:27:53     1.47
@@ -311,7 +311,14 @@
         mktemp(szTmpfile);
         strcat(szTmpfile, RC_EVL_SUF);
         scriptWrite(pFatscript, szTmpfile); /* Write the whole script out */
-        fprintf(stdout, RC_EVL_OUT, szTmpfile, szTmpfile);
+
+        /* Conditionally don't remove the temp file (see constants) */
+        if (configGetval(RC_DBG_VAL))
+            fprintf(stdout, RC_EVL_DBG, szTmpfile);
+        else
+            fprintf(stdout, RC_EVL_OUT, szTmpfile, szTmpfile);
+
+        /* Cleanup eval processing crap */
         free(szTmpfile);
         szTmpfile = NULL;
         scriptDelete(pFatscript);

CVSTrac 2.0.1