Lines Matching refs:fp

78 static int php_iptc_put1(FILE *fp, int spool, unsigned char c, unsigned char **spoolbuf TSRMLS_DC)  in php_iptc_put1()  argument
91 static int php_iptc_get1(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_get1() argument
96 c = getc(fp); in php_iptc_get1()
113 static int php_iptc_read_remaining(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_read_remaining() argument
115 while (php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC) != EOF) continue; in php_iptc_read_remaining()
123 static int php_iptc_skip_variable(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_skip_variable() argument
128 if ((c1 = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) return M_EOI; in php_iptc_skip_variable()
130 if ((c2 = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) return M_EOI; in php_iptc_skip_variable()
137 if (php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC) == EOF) return M_EOI; in php_iptc_skip_variable()
145 static int php_iptc_next_marker(FILE *fp, int spool, unsigned char **spoolbuf TSRMLS_DC) in php_iptc_next_marker() argument
151 c = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC); in php_iptc_next_marker()
156 if ((c = php_iptc_get1(fp, spool, spoolbuf TSRMLS_CC)) == EOF) in php_iptc_next_marker()
162 c = php_iptc_get1(fp, 0, 0 TSRMLS_CC); in php_iptc_next_marker()
167 php_iptc_put1(fp, spool, (unsigned char)c, spoolbuf TSRMLS_CC); in php_iptc_next_marker()
183 FILE *fp; in PHP_FUNCTION() local
205 if ((fp = VCWD_FOPEN(jpeg_file, "rb")) == 0) { in PHP_FUNCTION()
211 fstat(fileno(fp), &sb); in PHP_FUNCTION()
217 if (php_iptc_get1(fp, spool, poi?&poi:0 TSRMLS_CC) != 0xFF) { in PHP_FUNCTION()
218 fclose(fp); in PHP_FUNCTION()
225 if (php_iptc_get1(fp, spool, poi?&poi:0 TSRMLS_CC) != 0xD8) { in PHP_FUNCTION()
226 fclose(fp); in PHP_FUNCTION()
234 marker = php_iptc_next_marker(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
239 php_iptc_put1(fp, spool, (unsigned char)marker, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
245 php_iptc_skip_variable(fp, 0, 0 TSRMLS_CC); in PHP_FUNCTION()
246 php_iptc_read_remaining(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
259 php_iptc_skip_variable(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
269 php_iptc_put1(fp, spool, psheader[inx], poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
272 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len>>8), poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
273 php_iptc_put1(fp, spool, (unsigned char)(iptcdata_len&0xff), poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
276 php_iptc_put1(fp, spool, iptcdata[inx], poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
282 php_iptc_read_remaining(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
287 php_iptc_skip_variable(fp, spool, poi?&poi:0 TSRMLS_CC); in PHP_FUNCTION()
292 fclose(fp); in PHP_FUNCTION()