Lines Matching refs:fp

87 static int php_iptc_put1(FILE *fp, int spool, unsigned char c, unsigned char **spoolbuf TSRMLS_DC)  in php_iptc_put1()  argument
100 static int php_iptc_get1(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_get1() argument
105 c = getc(fp); in php_iptc_get1()
122 static int php_iptc_read_remaining(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_read_remaining() argument
124 while (php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC) != EOF) continue; in php_iptc_read_remaining()
132 static int php_iptc_skip_variable(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_skip_variable() argument
137 if ((c1 = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) return M_EOI; in php_iptc_skip_variable()
139 if ((c2 = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) return M_EOI; in php_iptc_skip_variable()
146 if (php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC) == EOF) return M_EOI; in php_iptc_skip_variable()
154 static int php_iptc_next_marker(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_next_marker() argument
160 c = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC); in php_iptc_next_marker()
165 if ((c = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) in php_iptc_next_marker()
171 c = php_iptc_get1(fp, 0, 0 TSRMLS_CC); in php_iptc_next_marker()
176 php_iptc_put1(fp, spool, (unsigned char)c, spoolbuf TSRMLS_CC); in php_iptc_next_marker()
192 FILE *fp; in PHP_FUNCTION() local
212 if ((fp = VCWD_FOPEN(jpeg_file, "rb")) == 0) { in PHP_FUNCTION()
218 fstat(fileno(fp), &sb); in PHP_FUNCTION()
224 if (php_iptc_get1(fp, spool, poi?&poi:0 TSRMLS_CC) != 0xFF) { in PHP_FUNCTION()
225 fclose(fp); in PHP_FUNCTION()
232 if (php_iptc_get1(fp, spool, poi?&poi:0 TSRMLS_CC) != 0xD8) { in PHP_FUNCTION()
233 fclose(fp); in PHP_FUNCTION()
241 marker = php_iptc_next_marker(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
246 php_iptc_put1(fp, spool, (unsigned char)marker, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
252 php_iptc_skip_variable(fp, 0, 0 TSRMLS_CC); in PHP_FUNCTION()
253 php_iptc_read_remaining(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
266 php_iptc_skip_variable(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
276 php_iptc_put1(fp, spool, psheader[inx], poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
279 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len>>8), poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
280 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len&0xff), poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
283 php_iptc_put1(fp, spool, iptcdata[inx], poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
289 php_iptc_read_remaining(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
294 php_iptc_skip_variable(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
299 fclose(fp); in PHP_FUNCTION()