Lines Matching refs:fp

85 static int php_iptc_put1(FILE *fp, int spool, unsigned char c, unsigned char **spoolbuf)  in php_iptc_put1()  argument
98 static int php_iptc_get1(FILE *fp, int spool, unsigned char **spoolbuf) in php_iptc_get1() argument
103 c = getc(fp); in php_iptc_get1()
120 static int php_iptc_read_remaining(FILE *fp, int spool, unsigned char **spoolbuf) in php_iptc_read_remaining() argument
122 while (php_iptc_get1(fp, spool, spoolbuf) != EOF) continue; in php_iptc_read_remaining()
130 static int php_iptc_skip_variable(FILE *fp, int spool, unsigned char **spoolbuf) in php_iptc_skip_variable() argument
135 if ((c1 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; in php_iptc_skip_variable()
137 if ((c2 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; in php_iptc_skip_variable()
144 if (php_iptc_get1(fp, spool, spoolbuf) == EOF) return M_EOI; in php_iptc_skip_variable()
152 static int php_iptc_next_marker(FILE *fp, int spool, unsigned char **spoolbuf) in php_iptc_next_marker() argument
158 c = php_iptc_get1(fp, spool, spoolbuf); in php_iptc_next_marker()
163 if ((c = php_iptc_get1(fp, spool, spoolbuf)) == EOF) in php_iptc_next_marker()
169 c = php_iptc_get1(fp, 0, 0); in php_iptc_next_marker()
174 php_iptc_put1(fp, spool, (unsigned char)c, spoolbuf); in php_iptc_next_marker()
190 FILE *fp; in PHP_FUNCTION() local
214 if ((fp = VCWD_FOPEN(jpeg_file, "rb")) == 0) { in PHP_FUNCTION()
220 zend_fstat(fileno(fp), &sb); in PHP_FUNCTION()
227 if (php_iptc_get1(fp, spool, poi?&poi:0) != 0xFF) { in PHP_FUNCTION()
228 fclose(fp); in PHP_FUNCTION()
235 if (php_iptc_get1(fp, spool, poi?&poi:0) != 0xD8) { in PHP_FUNCTION()
236 fclose(fp); in PHP_FUNCTION()
244 marker = php_iptc_next_marker(fp, spool, poi?&poi:0); in PHP_FUNCTION()
249 php_iptc_put1(fp, spool, (unsigned char)marker, poi?&poi:0); in PHP_FUNCTION()
255 php_iptc_skip_variable(fp, 0, 0); in PHP_FUNCTION()
256 fgetc(fp); /* skip already copied 0xFF byte */ in PHP_FUNCTION()
257 php_iptc_read_remaining(fp, spool, poi?&poi:0); in PHP_FUNCTION()
270 php_iptc_skip_variable(fp, spool, poi?&poi:0); in PHP_FUNCTION()
280 php_iptc_put1(fp, spool, psheader[inx], poi?&poi:0); in PHP_FUNCTION()
283 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len>>8), poi?&poi:0); in PHP_FUNCTION()
284 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len&0xff), poi?&poi:0); in PHP_FUNCTION()
287 php_iptc_put1(fp, spool, iptcdata[inx], poi?&poi:0); in PHP_FUNCTION()
293 php_iptc_read_remaining(fp, spool, poi?&poi:0); in PHP_FUNCTION()
298 php_iptc_skip_variable(fp, spool, poi?&poi:0); in PHP_FUNCTION()
303 fclose(fp); in PHP_FUNCTION()