[Haiku-commits] r31216 - haiku/trunk/src/apps/magnify
bonefish at mail.berlios.de
bonefish at mail.berlios.de
Wed Jun 24 00:11:47 CEST 2009
Author: bonefish
Date: 2009-06-24 00:11:45 +0200 (Wed, 24 Jun 2009)
New Revision: 31216
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31216&view=rev
Modified:
haiku/trunk/src/apps/magnify/Magnify.cpp
haiku/trunk/src/apps/magnify/Magnify.h
Log:
* Fixed warning.
* Fixed creation of settings file. The second creat() parameter specifies the
permission, not the open mode.
Modified: haiku/trunk/src/apps/magnify/Magnify.cpp
===================================================================
--- haiku/trunk/src/apps/magnify/Magnify.cpp 2009-06-23 21:08:40 UTC (rev 31215)
+++ haiku/trunk/src/apps/magnify/Magnify.cpp 2009-06-23 22:11:45 UTC (rev 31216)
@@ -494,7 +494,7 @@
long ref;
path.Append (kPrefsFileName);
- if ((ref = creat(path.Path(), O_RDWR)) >= 0) {
+ if ((ref = creat(path.Path(), S_IRUSR | S_IWUSR)) >= 0) {
float version = kCurrentVersion;
lseek (ref, 0, SEEK_SET);
@@ -1683,7 +1683,7 @@
void
-TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, char* name) const
+TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, const char* name) const
{
int32 bytesPerPixel;
const char *kColorSpaceName;
Modified: haiku/trunk/src/apps/magnify/Magnify.h
===================================================================
--- haiku/trunk/src/apps/magnify/Magnify.h 2009-06-23 21:08:40 UTC (rev 31215)
+++ haiku/trunk/src/apps/magnify/Magnify.h 2009-06-23 22:11:45 UTC (rev 31216)
@@ -114,7 +114,8 @@
void StartSave();
void SaveImage(entry_ref* ref, char* name, bool selectionOnly=false);
- void SaveBits(BFile* file, const BBitmap *bitmap, char* name) const;
+ void SaveBits(BFile* file, const BBitmap *bitmap,
+ const char* name) const;
void EndSave();
private:
More information about the Haiku-commits
mailing list