summaryrefslogtreecommitdiff
path: root/src/common/lock.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-13 16:25:50 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-14 16:18:22 -0800
commit069f39e8a1ebee3e4a4ce8302d0099842876782b (patch)
tree57d8de5f57d65878f8ef560e2884b9dee08e9323 /src/common/lock.cpp
parentf9563edf69f083287630f4b17db70d97524196d6 (diff)
downloadtmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.gz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.bz2
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.xz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.zip
Some formatting fixes before I go insane
Also delete the French translation from ladmin.
Diffstat (limited to 'src/common/lock.cpp')
-rw-r--r--src/common/lock.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/common/lock.cpp b/src/common/lock.cpp
index 2ba9a0a..13a99c5 100644
--- a/src/common/lock.cpp
+++ b/src/common/lock.cpp
@@ -7,30 +7,30 @@
/// (Until the file is closed, it keeps the old file)
// Start writing a tmpfile
-FILE *lock_fopen (const char *filename, int *info)
+FILE *lock_fopen(const char *filename, int *info)
{
char newfile[512];
FILE *fp;
- int no = getpid ();
+ int no = getpid();
// Get a filename that doesn't already exist
do
{
- sprintf (newfile, "%s_%d.tmp", filename, no++);
+ sprintf(newfile, "%s_%d.tmp", filename, no++);
}
- while ((fp = fopen_ (newfile, "r")) && (fclose_ (fp), 1));
+ while ((fp = fopen_(newfile, "r")) && (fclose_(fp), 1));
*info = --no;
- return fopen_ (newfile, "w");
+ return fopen_(newfile, "w");
}
// Delete the old file and rename the new file
-void lock_fclose (FILE * fp, const char *filename, int *info)
+void lock_fclose(FILE * fp, const char *filename, int *info)
{
char newfile[512];
if (fp)
{
- fclose_ (fp);
- sprintf (newfile, "%s_%d.tmp", filename, *info);
- rename (newfile, filename);
+ fclose_(fp);
+ sprintf(newfile, "%s_%d.tmp", filename, *info);
+ rename(newfile, filename);
}
}