• Home
  • Raw
  • Download

Lines Matching refs:header

48 	if ((psf->header.ptr = calloc (1, INITIAL_HEADER_SIZE)) == NULL)  in psf_allocate()
52 psf->header.len = INITIAL_HEADER_SIZE ; in psf_allocate()
63 newlen = (needed > psf->header.len) ? 2 * SF_MAX (needed, smallest) : 2 * psf->header.len ; in psf_bump_header_allocation()
70 if ((ptr = realloc (psf->header.ptr, newlen)) == NULL) in psf_bump_header_allocation()
71 { psf_log_printf (psf, "realloc (%p, %D) failed\n", psf->header.ptr, newlen) ; in psf_bump_header_allocation()
77 if (newlen > psf->header.len) in psf_bump_header_allocation()
78 memset ((char *) ptr + psf->header.len, 0, newlen - psf->header.len) ; in psf_bump_header_allocation()
80 psf->header.ptr = ptr ; in psf_bump_header_allocation()
81 psf->header.len = newlen ; in psf_bump_header_allocation()
391 maxlen = strlen ((char*) psf->header.ptr) ; in psf_asciiheader_printf()
392 start = ((char*) psf->header.ptr) + maxlen ; in psf_asciiheader_printf()
393 maxlen = psf->header.len - maxlen ; in psf_asciiheader_printf()
402 psf->header.indx = strlen ((char*) psf->header.ptr) ; in psf_asciiheader_printf()
455 { psf->header.ptr [psf->header.indx++] = x ; in header_put_byte()
461 { psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_marker()
462 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_marker()
463 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_marker()
464 psf->header.ptr [psf->header.indx++] = x ; in header_put_marker()
470 { psf->header.ptr [psf->header.indx++] = x ; in header_put_marker()
471 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_marker()
472 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_marker()
473 psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_marker()
483 { psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_be_short()
484 psf->header.ptr [psf->header.indx++] = x ; in header_put_be_short()
489 { psf->header.ptr [psf->header.indx++] = x ; in header_put_le_short()
490 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_le_short()
495 { psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_be_3byte()
496 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_be_3byte()
497 psf->header.ptr [psf->header.indx++] = x ; in header_put_be_3byte()
502 { psf->header.ptr [psf->header.indx++] = x ; in header_put_le_3byte()
503 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_le_3byte()
504 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_le_3byte()
509 { psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_be_int()
510 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_be_int()
511 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_be_int()
512 psf->header.ptr [psf->header.indx++] = x ; in header_put_be_int()
517 { psf->header.ptr [psf->header.indx++] = x ; in header_put_le_int()
518 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_le_int()
519 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_le_int()
520 psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_le_int()
527 { psf->header.ptr [psf->header.indx++] = (x >> 56) ; in header_put_be_8byte()
528 psf->header.ptr [psf->header.indx++] = (x >> 48) ; in header_put_be_8byte()
529 psf->header.ptr [psf->header.indx++] = (x >> 40) ; in header_put_be_8byte()
530 psf->header.ptr [psf->header.indx++] = (x >> 32) ; in header_put_be_8byte()
531 psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_be_8byte()
532 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_be_8byte()
533 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_be_8byte()
534 psf->header.ptr [psf->header.indx++] = x ; in header_put_be_8byte()
539 { psf->header.ptr [psf->header.indx++] = x ; in header_put_le_8byte()
540 psf->header.ptr [psf->header.indx++] = (x >> 8) ; in header_put_le_8byte()
541 psf->header.ptr [psf->header.indx++] = (x >> 16) ; in header_put_le_8byte()
542 psf->header.ptr [psf->header.indx++] = (x >> 24) ; in header_put_le_8byte()
543 psf->header.ptr [psf->header.indx++] = (x >> 32) ; in header_put_le_8byte()
544 psf->header.ptr [psf->header.indx++] = (x >> 40) ; in header_put_le_8byte()
545 psf->header.ptr [psf->header.indx++] = (x >> 48) ; in header_put_le_8byte()
546 psf->header.ptr [psf->header.indx++] = (x >> 56) ; in header_put_le_8byte()
573 if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16)) in psf_binheader_writef()
667 float32_be_write (floatdata, psf->header.ptr + psf->header.indx) ; in psf_binheader_writef()
669 float32_le_write (floatdata, psf->header.ptr + psf->header.indx) ; in psf_binheader_writef()
670 psf->header.indx += 4 ; in psf_binheader_writef()
677 double64_be_write (doubledata, psf->header.ptr + psf->header.indx) ; in psf_binheader_writef()
679 double64_le_write (doubledata, psf->header.ptr + psf->header.indx) ; in psf_binheader_writef()
680 psf->header.indx += 8 ; in psf_binheader_writef()
689 …if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bu… in psf_binheader_writef()
696 memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ; in psf_binheader_writef()
698 psf->header.indx += size ; in psf_binheader_writef()
699 psf->header.ptr [psf->header.indx - 1] = 0 ; in psf_binheader_writef()
710 …if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bu… in psf_binheader_writef()
716 memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + (size & 1)) ; in psf_binheader_writef()
718 psf->header.indx += size ; in psf_binheader_writef()
730 …if (psf->header.indx + 1 + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf,… in psf_binheader_writef()
734 memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ; in psf_binheader_writef()
735 psf->header.indx += size ; in psf_binheader_writef()
743 …if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, siz… in psf_binheader_writef()
746 memcpy (&(psf->header.ptr [psf->header.indx]), bindata, size) ; in psf_binheader_writef()
747 psf->header.indx += size ; in psf_binheader_writef()
754 …if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, siz… in psf_binheader_writef()
759 { psf->header.ptr [psf->header.indx] = 0 ; in psf_binheader_writef()
760 psf->header.indx ++ ; in psf_binheader_writef()
767 memcpy (&(psf->header.ptr [psf->header.indx]), bindata, 16) ; in psf_binheader_writef()
768 psf->header.indx += 16 ; in psf_binheader_writef()
775 …if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, siz… in psf_binheader_writef()
778 psf->header.indx += size ; in psf_binheader_writef()
785 if ((sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, size)) in psf_binheader_writef()
788 psf->header.indx = size ; in psf_binheader_writef()
853 if (psf->header.indx + bytes >= psf->header.len && psf_bump_header_allocation (psf, bytes)) in header_read()
856 if (psf->header.indx + bytes > psf->header.end) in header_read()
857 …{ count = psf_fread (psf->header.ptr + psf->header.end, 1, bytes - (psf->header.end - psf->header.… in header_read()
858 if (count != bytes - (int) (psf->header.end - psf->header.indx)) in header_read()
862 psf->header.end += count ; in header_read()
865 memcpy (ptr, psf->header.ptr + psf->header.indx, bytes) ; in header_read()
866 psf->header.indx += bytes ; in header_read()
876 if (psf->header.indx + position >= psf->header.len) in header_seek()
878 if (position > psf->header.len) in header_seek()
880 psf->header.indx = psf->header.end ; in header_seek()
884 if (position > psf->header.end) in header_seek()
885 …psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, position - psf->header.end, ps… in header_seek()
886 psf->header.indx = position ; in header_seek()
890 if (psf->header.indx + position >= psf->header.len) in header_seek()
893 if (psf->header.indx + position < 0) in header_seek()
896 if (psf->header.indx >= psf->header.len) in header_seek()
901 if (psf->header.indx + position <= psf->header.end) in header_seek()
902 { psf->header.indx += position ; in header_seek()
906 if (psf->header.indx + position > psf->header.len) in header_seek()
908 psf->header.indx = psf->header.end ; in header_seek()
913 …psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, position - (psf->header.end - … in header_seek()
914 psf->header.indx = psf->header.end ; in header_seek()
930 if (psf->header.indx + bufsize >= psf->header.len && psf_bump_header_allocation (psf, bufsize)) in header_gets()
934 { if (psf->header.indx < psf->header.end) in header_gets()
935 { ptr [k] = psf->header.ptr [psf->header.indx] ; in header_gets()
936 psf->header.indx ++ ; in header_gets()
939 { psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, 1, psf) ; in header_gets()
940 ptr [k] = psf->header.ptr [psf->header.indx] ; in header_gets()
941 psf->header.indx = psf->header.end ; in header_gets()
973 if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16)) in psf_binheader_readf()
1100 if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count)) in psf_binheader_readf()