Lines Matching defs:a_vfp

501  * Arguments:	VFP_T *a_vfp - VFP_T pointer associated with file to set flags
512 vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags)
516 if (a_vfp == (VFP_T *)NULL) {
522 if ((a_vfp->_vfpSize != 0) && (a_vfp->_vfpFlags & _VFP_MMAP)) {
527 (void) madvise(a_vfp->_vfpStart, a_vfp->_vfpMapSize,
532 (void) madvise(a_vfp->_vfpStart, a_vfp->_vfpSize,
537 (void) madvise(a_vfp->_vfpStart, a_vfp->_vfpSize,
548 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to rewind
554 vfpRewind(VFP_T *a_vfp)
558 if (a_vfp == (VFP_T *)NULL) {
564 if (a_vfp->_vfpCurr > a_vfp->_vfpHighWater) {
565 a_vfp->_vfpHighWater = a_vfp->_vfpCurr;
570 a_vfp->_vfpCurr = a_vfp->_vfpStart;
576 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to set
598 vfpSetSize(VFP_T *a_vfp, size_t a_size)
605 if (a_vfp == (VFP_T *)NULL) {
611 if (!(a_vfp->_vfpFlags & _VFP_MALLOC)) {
621 if (a_size <= a_vfp->_vfpSize) {
627 curSize = a_vfp->_vfpSize;
628 a_vfp->_vfpSize = a_size;
632 if (a_vfp->_vfpStart != (char *)NULL) {
633 np = (char *)realloc(a_vfp->_vfpStart, a_vfp->_vfpSize+1);
639 np = (char *)malloc(a_vfp->_vfpSize+1);
648 np[a_vfp->_vfpSize] = '\0';
655 a_vfp->_vfpCurr = (char *)(((ptrdiff_t)a_vfp->_vfpCurr -
656 (ptrdiff_t)a_vfp->_vfpStart) + np);
659 a_vfp->_vfpHighWater = (char *)(((ptrdiff_t)a_vfp->_vfpHighWater -
660 (ptrdiff_t)a_vfp->_vfpStart) + np);
663 a_vfp->_vfpEnd = (np + a_vfp->_vfpSize)-1;
666 a_vfp->_vfpStart = np;
674 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to truncate
684 vfpTruncate(VFP_T *a_vfp)
688 if (a_vfp == (VFP_T *)NULL) {
698 a_vfp->_vfpCurr = a_vfp->_vfpStart;
702 a_vfp->_vfpHighWater = a_vfp->_vfpStart;
706 *a_vfp->_vfpCurr = '\0';
710 if (a_vfp->_vfpFile != (FILE *)NULL) {
711 (void) ftruncate(fileno(a_vfp->_vfpFile), 0);
718 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to write
725 vfpWriteToFile(VFP_T *a_vfp, char *a_path)
734 if (a_vfp == (VFP_T *)NULL) {
741 if ((a_vfp->_vfpOverflow != 0) || (vfpGetBytesAvailable(a_vfp) < 1)) {
755 len = vfpGetModifiedLen(a_vfp);
763 result = vfpSafeWrite(fd, a_vfp->_vfpStart, len);
779 (void) vfpClearModified(a_vfp);
793 * VFP_T **a_vfp - pointer to pointer to VFP_T returned by vfpOpen
796 * in-memory data represented by a_vfp - used to verify
799 * == (char *)NULL - use path associated with a_vfp
805 * - the VFP referenced by *a_vfp is free()ed and
808 * - the VFP referenced by *a_vfp is not affected;
816 vfpCheckpointFile(VFP_T **r_cpVfp, VFP_T **a_vfp, char *a_path)
819 VFP_T *avfp; /* local -> to a_vfp */
835 if (a_vfp == (VFP_T **)NULL) {
840 /* localize reference to a_vfp */
842 avfp = *a_vfp;
922 *a_vfp = (VFP_T *)NULL;
1118 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to clear
1126 vfpClearModified(VFP_T *a_vfp)
1132 flags = a_vfp->_vfpFlags;
1136 a_vfp->_vfpFlags &= (~_VFP_MODIFIED);
1146 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to set
1154 vfpSetModified(VFP_T *a_vfp)
1160 flags = a_vfp->_vfpFlags;
1164 a_vfp->_vfpFlags |= _VFP_MODIFIED;
1174 * Arguments: VFP_T *a_vfp - VFP_T pointer associated with file to get
1182 vfpGetModified(VFP_T *a_vfp)
1186 return ((a_vfp->_vfpFlags & _VFP_MODIFIED) != 0);