]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory).
authorFlorian Krohm <florian@eich-krohm.de>
Wed, 20 Aug 2014 20:37:33 +0000 (20:37 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Wed, 20 Aug 2014 20:37:33 +0000 (20:37 +0000)
Looks like these were leftovers from early days -- perhaps r7235.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14321

callgrind/dump.c
callgrind/global.h

index 511a4c324c156a2d7b5e96f6009638259589bafa..aa1ecb65d54959f7aa8ee76489c647e416675f86 100644 (file)
@@ -37,7 +37,6 @@
 static Int out_counter = 0;
 
 static HChar* out_file = 0;
-static HChar* out_directory = 0;
 static Bool dumps_initialized = False;
 
 /* Command */
@@ -62,18 +61,6 @@ Int CLG_(get_dump_counter)(void)
   return out_counter;
 }
 
-HChar* CLG_(get_out_file)()
-{
-    CLG_(init_dumps)();
-    return out_file;
-}
-
-HChar* CLG_(get_out_directory)()
-{
-    CLG_(init_dumps)();
-    return out_directory;
-}
-
 /*------------------------------------------------------------*/
 /*--- Output file related stuff                            ---*/
 /*------------------------------------------------------------*/
@@ -1654,7 +1641,7 @@ void init_cmdbuf(void)
 }
 
 /*
- * Set up file names for dump output: <out_directory>, <out_file>.
+ * Set up file names for dump output: <out_file>.
  * <out_file> is derived from the output format string, which defaults
  * to "callgrind.out.%p", where %p is replaced with the PID.
  * For the final file name, on intermediate dumps a counter is appended,
@@ -1669,7 +1656,6 @@ void init_cmdbuf(void)
  */
 void CLG_(init_dumps)()
 {
-   Int lastSlash, i;
    SysRes res;
 
    static int thisPID = 0;
@@ -1687,7 +1673,6 @@ void CLG_(init_dumps)()
    /* If a file name was already set, clean up before */
    if (out_file) {
        VG_(free)(out_file);
-       VG_(free)(out_directory);
        VG_(free)(filename);
        out_counter = 0;
    }
@@ -1696,19 +1681,6 @@ void CLG_(init_dumps)()
    out_file =
        VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format);
 
-   /* get base directory for dump/command/result files */
-   CLG_ASSERT(out_file[0] == '/');
-   lastSlash = 0;
-   i = 1;
-   while(out_file[i]) {
-       if (out_file[i] == '/') lastSlash = i;
-       i++;
-   }
-   i = lastSlash;
-   out_directory = (HChar*) CLG_MALLOC("cl.dump.init_dumps.1", i+1);
-   VG_(strncpy)(out_directory, out_file, i);
-   out_directory[i] = 0;
-
    /* allocate space big enough for final filenames */
    filename = (HChar*) CLG_MALLOC("cl.dump.init_dumps.2",
                                  VG_(strlen)(out_file)+32);
index c9e03da095903d1bba10bc6eef8a1b8052376b4c..1d79f809ad6fed5ae14a0b516aae97feb79f4505 100644 (file)
@@ -796,8 +796,6 @@ void CLG_(run_post_signal_on_call_stack_bottom)(void);
 
 /* from dump.c */
 void CLG_(init_dumps)(void);
-HChar* CLG_(get_out_file)(void);
-HChar* CLG_(get_out_directory)(void);
 
 /*------------------------------------------------------------*/
 /*--- Exported global variables                            ---*/