summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3436d2c1c4..5070cf1ac4 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -569,13 +569,14 @@ BOOL get_short_archi(char *short_archi, char *long_archi)
}
/****************************************************************************
-Version information in Microsoft files is held in a VS_VERSION_INFO structure.
-There are two case to be covered here: PE (Portable Executable) and NE (New
-Executable) files. Both files support the same INFO structure, but PE files
-store the signature in unicode, and NE files store it as !unicode.
+ Version information in Microsoft files is held in a VS_VERSION_INFO structure.
+ There are two case to be covered here: PE (Portable Executable) and NE (New
+ Executable) files. Both files support the same INFO structure, but PE files
+ store the signature in unicode, and NE files store it as !unicode.
+ returns -1 on error, 1 on version info found, and 0 on no version info found.
****************************************************************************/
-static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
- uint32 *minor)
+
+static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32 *minor)
{
int i;
char *buf;
@@ -689,7 +690,7 @@ static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
(*major>>16)&0xffff, *major&0xffff,
(*minor>>16)&0xffff, *minor&0xffff));
SAFE_FREE(buf);
- return True;
+ return 1;
}
}
}
@@ -699,7 +700,7 @@ static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
/* Version info not found, fall back to origin date/time */
DEBUG(10,("get_file_version: PE file [%s] has no version info\n", fname));
SAFE_FREE(buf);
- return False;
+ return 0;
} else if (SVAL(buf,NE_HEADER_SIGNATURE_OFFSET) == NE_HEADER_SIGNATURE) {
if (CVAL(buf,NE_HEADER_TARGET_OS_OFFSET) != NE_HEADER_TARGOS_WIN ) {
@@ -766,7 +767,7 @@ static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
(*major>>16)&0xffff, *major&0xffff,
(*minor>>16)&0xffff, *minor&0xffff));
SAFE_FREE(buf);
- return True;
+ return 1;
}
}
}
@@ -774,7 +775,7 @@ static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
/* Version info not found, fall back to origin date/time */
DEBUG(0,("get_file_version: NE file [%s] Version info not found\n", fname));
SAFE_FREE(buf);
- return False;
+ return 0;
} else
/* Assume this isn't an error... the file just looks sort of like a PE/NE file */
@@ -783,7 +784,7 @@ static BOOL get_file_version(files_struct *fsp, char *fname,uint32 *major,
no_version_info:
SAFE_FREE(buf);
- return False;
+ return 0;
error_exit:
SAFE_FREE(buf);