|
From: <cre...@us...> - 2006-11-16 22:15:22
|
Revision: 1594
http://svn.sourceforge.net/frontierkernel/?rev=1594&view=rev
Author: creecode
Date: 2006-11-16 14:15:14 -0800 (Thu, 16 Nov 2006)
Log Message:
-----------
in getjpegheightwidthverb function, added call to extendfilespec
Modified Paths:
--------------
Frontier/trunk/Common/source/langhtml.c
Modified: Frontier/trunk/Common/source/langhtml.c
===================================================================
--- Frontier/trunk/Common/source/langhtml.c 2006-11-11 18:46:11 UTC (rev 1593)
+++ Frontier/trunk/Common/source/langhtml.c 2006-11-16 22:15:14 UTC (rev 1594)
@@ -3185,55 +3185,71 @@
} /*ScanJPEGHeader*/
-boolean getjpegheightwidthverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+boolean getjpegheightwidthverb ( hdltreenode hparam1, tyvaluerecord *vreturned ) {
+ //
+ // 2006-11-16 creedon: added call to extendfilespec
+ //
+
+ boolean fl;
+ hdlfilenum fnum;
+ hdllistrecord list = nil;
tyfilespec fs;
- hdlfilenum fnum;
- boolean fl;
unsigned short height, width;
- hdllistrecord list = nil;
flnextparamislast = true;
- if (!getfilespecvalue (hparam1, 1, &fs))
- return (false);
+ if ( ! getfilespecvalue ( hparam1, 1, &fs ) )
+ return ( false );
+
+ ( void ) extendfilespec ( &fs, &fs );
- fl = openfile (&fs, &fnum, true);
+ fl = openfile ( &fs, &fnum, true );
- if (fl) {
+ if ( fl ) {
- fl = ScanJPEGHeader (fnum, &height, &width);
+ fl = ScanJPEGHeader ( fnum, &height, &width );
- closefile (fnum);
+ closefile ( fnum );
- if (fl) {
+ if ( fl ) {
+
#ifdef xxxoplanglists
- if (opnewlist (&list, false)) {
- if (langpushlistlong (list, (long) height)) {
- if (langpushlistlong (list, (long) width)) {
- return (setheapvalue ((Handle) list, listvaluetype, vreturned));
- }
+
+ if ( opnewlist ( &list, false ) ) {
+
+ if ( langpushlistlong ( list, ( long ) height ) ) {
+
+ if ( langpushlistlong ( list, ( long ) width ) )
+
+ return ( setheapvalue ( ( Handle ) list, listvaluetype, vreturned ) );
+
}
}
#else
Point pt;
+
pt.v = width;
pt.h = height;
- return (setpointvalue (pt, vreturned) && coercetolist (vreturned, listvaluetype));
+
+ return ( setpointvalue ( pt, vreturned ) && coercetolist ( vreturned, listvaluetype ) );
+
#endif
+
}
}
- if (list != nil)
- opdisposelist (list);
+ if ( list != nil )
+ opdisposelist ( list );
- /* JES: 10/28/2002, 9.1b1 -- ScriptError if the file couldn't be parsed for JPEG height/width instead of a silent failure */
- if (!fl) {
- langerrormessage (BIGSTRING ("\x49""Can't get JPEG height and width because the file isn't a valid JPEG file."));
- }
- return (false);
- } /*getjpegheightwidthverb*/
+ if ( ! fl ) // JES: 10/28/2002, 9.1b1 -- ScriptError if the file couldn't be parsed for JPEG height/width instead of a silent failure
+
+ langerrormessage ( BIGSTRING ( "\x49""Can't get JPEG height and width because the file isn't a valid JPEG file." ) );
+
+ return ( false );
+
+ } // getjpegheightwidthverb
#ifdef MACVERSION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|