summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-28 15:00:23 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-28 15:00:23 +0100
commit013b75b7d655115503397ea4284b776802605080 (patch)
tree6b02a4e853c9fe56b96aab89d6962e8ff397007e
parent9382f127ccebdd59917c97c61d008ed0e127cd75 (diff)
downloadtuxcmd-modules-013b75b7d655115503397ea4284b776802605080.tar.xz
Consolidate boolean data types
-rw-r--r--common/tuxcmd-vfs.h32
-rw-r--r--gvfs/gvfs.c6
-rw-r--r--unrar/unrar.c4
-rw-r--r--zip/zip.cpp4
4 files changed, 23 insertions, 23 deletions
diff --git a/common/tuxcmd-vfs.h b/common/tuxcmd-vfs.h
index 2ebed6d..38c7b59 100644
--- a/common/tuxcmd-vfs.h
+++ b/common/tuxcmd-vfs.h
@@ -56,10 +56,10 @@ typedef void * TVFSFileDes;
/* Return FALSE to break the operation */
-typedef int (* TVFSProgressCallback)
- (guint64 position,
- guint64 max,
- void *user_data);
+typedef gboolean (* TVFSProgressCallback)
+ (guint64 position,
+ guint64 max,
+ void *user_data);
/* Return index of the choice selected or negative number when dialog has been cancelled */
typedef void (* TVFSAskQuestionCallback)
@@ -69,18 +69,18 @@ typedef void (* TVFSAskQuestionCallback)
int cancel_choice,
void *user_data);
-typedef int (* TVFSAskPasswordCallback)
- (const char *message,
- const char *default_user,
- const char *default_domain,
- const char *default_password,
- TVFSAskPasswordFlags flags,
- char **username,
- char **password,
- int *anonymous,
- char **domain,
- TVFSPasswordSave *password_save,
- void *user_data);
+typedef gboolean (* TVFSAskPasswordCallback)
+ (const char *message,
+ const char *default_user,
+ const char *default_domain,
+ const char *default_password,
+ TVFSAskPasswordFlags flags,
+ char **username,
+ char **password,
+ gboolean *anonymous,
+ char **domain,
+ TVFSPasswordSave *password_save,
+ void *user_data);
/* current version of the VFS API */
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index d72b417..6ef3a83 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -131,10 +131,10 @@ ask_password_cb (GMountOperation *op,
struct TVFSGlobs *globs;
char *username;
char *password;
- int anonymous;
- char *domain;
+ gboolean anonymous;
+ char *domain;
TVFSPasswordSave password_save;
- int result;
+ gboolean result;
globs = (struct TVFSGlobs*) user_data;
diff --git a/unrar/unrar.c b/unrar/unrar.c
index 61ce4c4..f24aca5 100644
--- a/unrar/unrar.c
+++ b/unrar/unrar.c
@@ -239,7 +239,7 @@ unrar_callback (UINT msg, LONG UserData, LONG P1, LONG P2)
// long int res = globs->extract_callback_func((u_int64_t)P1, (u_int64_t)((u_int64_t)P1 + (u_int64_t)P2), globs->extract_callback_data);
globs->extract_done += P2;
- int res = globs->callback_progress(globs->extract_done, globs->extract_file_size, globs->callback_data);
+ gboolean res = globs->callback_progress(globs->extract_done, globs->extract_file_size, globs->callback_data);
// fprintf(stderr, " (II) unrar_callback: res = %d \n", res);
if (! res ) {
@@ -255,7 +255,7 @@ unrar_callback (UINT msg, LONG UserData, LONG P1, LONG P2)
fprintf (stderr, " (II) unrar_callback: UCM_NEEDPASSWORD message, P1 = %ld, P2 = %ld, (char*)P1 = '%s', maxlen = %ld \n", P1, P2, (char*)P1, P2);
char *passwd = NULL;
- int res = FALSE;
+ gboolean res = FALSE;
globs->failed_passwd_callback = TRUE;
if (globs->callback_ask_password) {
diff --git a/zip/zip.cpp b/zip/zip.cpp
index 0432b6f..577941f 100644
--- a/zip/zip.cpp
+++ b/zip/zip.cpp
@@ -940,7 +940,7 @@ VFSCopyToLocal (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstN
char *dest_path;
char *dest_filename;
char *passwd;
- int res;
+ gboolean res;
if (sSrcName == NULL || sDstName == NULL || strlen (sSrcName) < 1 || strlen (sDstName) < 1) {
@@ -1022,7 +1022,7 @@ VFSCopyFromLocal (struct TVFSGlobs *globs, const char *sSrcName, const char *sDs
gboolean try_again;
char *s;
char *passwd;
- int res;
+ gboolean res;
if (sSrcName == NULL || sDstName == NULL || strlen (sSrcName) < 1 || strlen (sDstName) < 1) {
printf ("(EE) VFSCopyFromLocal: The value of 'sSrcName' or 'sDstName' is NULL or empty\n");