mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
+ Works now with Delphi streams too
This commit is contained in:
parent
66c66c9b09
commit
977f705ba0
@ -19,7 +19,7 @@ Program cjpeg;
|
|||||||
works regardless of which command line style is used. }
|
works regardless of which command line style is used. }
|
||||||
|
|
||||||
{$I jconfig.inc}
|
{$I jconfig.inc}
|
||||||
|
{$undef PPM_SUPPORTED}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
jmorecfg,
|
jmorecfg,
|
||||||
@ -32,7 +32,6 @@ uses
|
|||||||
JcAPImin, JcAPIstd, JcParam,
|
JcAPImin, JcAPIstd, JcParam,
|
||||||
{$ifdef TARGA_SUPPORTED} rdtarga, {$endif}
|
{$ifdef TARGA_SUPPORTED} rdtarga, {$endif}
|
||||||
{$ifdef BMP_SUPPORTED} rdbmp, {$endif}
|
{$ifdef BMP_SUPPORTED} rdbmp, {$endif}
|
||||||
{$ifdef PPM_SUPPORTED} rdppm, {$endif}
|
|
||||||
{$ifdef EXT_SWITCH} rdswitch, {$endif}
|
{$ifdef EXT_SWITCH} rdswitch, {$endif}
|
||||||
{cderror,}
|
{cderror,}
|
||||||
jdeferr;
|
jdeferr;
|
||||||
@ -74,7 +73,11 @@ begin
|
|||||||
if JFREAD(fptr, @c, 1) <> 1 then
|
if JFREAD(fptr, @c, 1) <> 1 then
|
||||||
ERREXIT(j_common_ptr(cinfo), JERR_INPUT_EMPTY);
|
ERREXIT(j_common_ptr(cinfo), JERR_INPUT_EMPTY);
|
||||||
|
|
||||||
|
{$ifndef delphi_stream}
|
||||||
Seek(fptr^, 0); { Nomssi: probably not portable }
|
Seek(fptr^, 0); { Nomssi: probably not portable }
|
||||||
|
{$else}
|
||||||
|
Fptr^.Seek(0,0);
|
||||||
|
{$endif}
|
||||||
if (IOresult <> 0) then
|
if (IOresult <> 0) then
|
||||||
ERREXIT(j_common_ptr(cinfo), JERR_UNGETC_FAILED);
|
ERREXIT(j_common_ptr(cinfo), JERR_UNGETC_FAILED);
|
||||||
GetFirstChar := c;
|
GetFirstChar := c;
|
||||||
|
Loading…
Reference in New Issue
Block a user