Skip to content

Commit

Permalink
Renamed tmpdir() functions
Browse files Browse the repository at this point in the history
  • Loading branch information
megastep committed Nov 10, 2004
1 parent 90221ae commit 140b99f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static char* write_temp_script(const char* name, char* name_out,

name_out[PATH_MAX-1] = '\0';
name_out[PATH_MAX-2] = '\0';
strncpy(name_out, tmpdir(), PATH_MAX-2);
strncpy(name_out, dir_mktmp(), PATH_MAX-2);
name_out[strlen(name_out)] = '/';
strncpy(name_out+strlen(name_out), name, PATH_MAX-strlen(name_out)-1);

Expand Down
4 changes: 2 additions & 2 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static void dobz2init()

static char tmpdirname[PATH_MAX] = "\0";

const char* tmpdir()
const char* dir_mktmp(void)
{
unsigned count;

Expand All @@ -810,7 +810,7 @@ const char* tmpdir()
return NULL;
}

int cleantmpdir()
int dir_cleantmp(void)
{
DIR* dir;
struct dirent *entry;
Expand Down
10 changes: 5 additions & 5 deletions file.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: file.h,v 1.24 2004-11-10 22:23:07 megastep Exp $ */
/* $Id: file.h,v 1.25 2004-11-10 22:26:08 megastep Exp $ */

#ifndef __LOKI_FILE_H__
#define __LOKI_FILE_H__
Expand Down Expand Up @@ -56,11 +56,11 @@ extern void file_create_hierarchy(install_info *info, const char *path);
extern void dir_create_hierarchy(install_info *info, const char *path, int mode);
extern int dir_is_accessible(const char *path);

/** create a temporary directory and return it's name. Failure to create the
/** Create a temporary directory and return it's name. Failure to create the
* directory will abort the program. It is only allowed to created inodes that
* can be removed with unlink() in that directory */
extern const char* tmpdir();
extern const char *dir_mktmp(void);

/** clean all files in the temporary directory and remove it */
extern int cleantmpdir();
/** Clean all files in the temporary directory and remove it */
extern int dir_cleantmp(void);
#endif
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: main.c,v 1.75 2004-11-10 22:23:07 megastep Exp $ */
/* $Id: main.c,v 1.76 2004-11-10 22:26:08 megastep Exp $ */

/*
Modifications by Borland/Inprise Corp.:
Expand Down Expand Up @@ -75,7 +75,7 @@ void exit_setup(int ret)
FreePlugins();
free_corrupt_files();
unmount_filesystems();
cleantmpdir();
dir_cleantmp();
log_exit();
exit(ret);
}
Expand Down

0 comments on commit 140b99f

Please sign in to comment.