diff --git a/src/add-ons/tracker/zipomatic/ZipOMatic.rdef b/src/add-ons/tracker/zipomatic/ZipOMatic.rdef index 548947b3ef..dd36572d0a 100644 --- a/src/add-ons/tracker/zipomatic/ZipOMatic.rdef +++ b/src/add-ons/tracker/zipomatic/ZipOMatic.rdef @@ -2,7 +2,7 @@ * ZipOMatic.rdef */ -resource app_signature "application/x-vnd.obos.zip-o-matic"; +resource app_signature "application/x-vnd.haiku.zip-o-matic"; resource app_flags B_SINGLE_LAUNCH; diff --git a/src/add-ons/tracker/zipomatic/ZipOMaticMisc.cpp b/src/add-ons/tracker/zipomatic/ZipOMaticMisc.cpp index f719e13d8a..7b7a6a2d14 100644 --- a/src/add-ons/tracker/zipomatic/ZipOMaticMisc.cpp +++ b/src/add-ons/tracker/zipomatic/ZipOMaticMisc.cpp @@ -1,47 +1,53 @@ -// license: public domain -// authors: jonas.sundstrom@kirilla.com +/* + * Copyright 2003-2006, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Jonas Sundström, jonas.sundstrom@kirilla.com + */ + #include "ZipOMaticMisc.h" #include +#include + +#include + status_t -find_and_create_directory (directory_which a_which, BVolume * a_volume, const char * a_relative_path, BPath * a_full_path) +find_and_create_directory(directory_which which, BVolume* volume, + const char* relativePath, BPath* fullPath) { - status_t status = B_OK; - BPath path; - mode_t mask = 0; - - status = find_directory (a_which, & path, true, a_volume); // create = true - + BPath path; + status_t status = find_directory(which, &path, true, volume); if (status != B_OK) return status; - - if (a_relative_path != NULL) - { - path.Append(a_relative_path); - - mask = umask (0); - umask (mask); - - status = create_directory (path.Path(), mask); + + if (relativePath != NULL) { + path.Append(relativePath); + + mode_t mask = umask(0); + umask(mask); + + status = create_directory(path.Path(), mask); if (status != B_OK) return status; } - - if (a_full_path != NULL) - { - status = a_full_path->SetTo(path.Path()); + + if (fullPath != NULL) { + status = fullPath->SetTo(path.Path()); if (status != B_OK) return status; } - + return B_OK; } -void -error_message (const char * a_text, int32 a_status) + +void +error_message(const char* text, int32 status) { - PRINT(("%s: %s\n", a_text, strerror(a_status))); + PRINT(("%s: %s\n", text, strerror(status))); } diff --git a/src/add-ons/tracker/zipomatic/ZipOMaticMisc.h b/src/add-ons/tracker/zipomatic/ZipOMaticMisc.h index d975239237..08d042a4d8 100644 --- a/src/add-ons/tracker/zipomatic/ZipOMaticMisc.h +++ b/src/add-ons/tracker/zipomatic/ZipOMaticMisc.h @@ -1,24 +1,28 @@ -#ifndef __ZIPOMATIC_MISC__ -#define __ZIPOMATIC_MISC__ +/* + * Copyright 2003-2006, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Jonas Sundström, jonas.sundstrom@kirilla.com + */ +#ifndef ZIPOMATIC_MISC_H +#define ZIPOMATIC_MISC_H -#include -#include -#include -#include -#include -#include #include #include -#define ZIPOMATIC_APP_SIG "application/x-vnd.obos.zip-o-matic" +class BPath; +class BVolume; + + +#define ZIPOMATIC_APP_SIG "application/x-vnd.haiku.zip-o-matic" #define ZIPOMATIC_APP_NAME "ZipOMatic" -#define ZIPPO_WINDOW_QUIT 'winq' +#define ZIPPO_WINDOW_QUIT 'winq' -status_t find_and_create_directory (directory_which a_which, BVolume * a_volume = NULL, const char * a_relative_path = NULL, BPath * a_full_path = NULL); - -void error_message (const char * a_text, int32 a_status); - -#endif // __ZIPOMATIC_MISC__ +status_t find_and_create_directory(directory_which which, BVolume* volume = NULL, + const char* relativePath = NULL, BPath* fullPath = NULL); +void error_message(const char* text, int32 status); +#endif // ZIPOMATIC_MISC_H