Sponsored Content
Full Discussion: help with fseek
Top Forums Programming help with fseek Post 302344445 by ramkrix on Sunday 16th of August 2009 04:47:38 PM
Old 08-16-2009
Thank you Jim
 

3 More Discussions You Might Find Interesting

1. Programming

error when using fseek() function

The errors EBADF & ESPIPE occur at this fseek call. Does anybody know how to solve this problem? Thanks in advance. toFileStream=fdopen(localFileDes,"ra+"); if(fseek(toFileStream, 0, SEEK_END)!=0){ if(errno==EBADF) printf("errno==EBADF\n"); if(errno==EINVAL)... (3 Replies)
Discussion started by: ivancheung
3 Replies

2. Programming

q on fseek() & ftell() + tga files

In determining the true file size of a .tga file is the fseek(fptr,0,SEEK_END); file_size = ftell(fptr); combination reliable ? The reason Im asking is because the value of file_size is in agreement with doing a wc -c mytga.tga however when I get the value of the extension... (2 Replies)
Discussion started by: JamesGoh
2 Replies

3. Programming

help with reading a binary file and fseek

this is my code and no matter what record number the user enters i cant get any of the records fields to read into the structure acct. What am i doing wrong? #include <stdio.h> typedef struct { char name; int number; float balance; } acct_info_t; int main (int... (0 Replies)
Discussion started by: bjhum33
0 Replies
Netpbm subroutine library: pm_tmpfile() function(3)	     Library Functions Manual	       Netpbm subroutine library: pm_tmpfile() function(3)

NAME
pm_tmpfile() - create a temporary unnamed file SYNOPSIS
#include <netpbm/pm.h> FILE * pm_tmpfile(void); EXAMPLE
This simple example creates a temporary file, writes 'hello world' to it, then reads back and prints those contents. #include <netpbm/pm.h> FILE * myfileP; myfile = pm_tmpfile(); fprintf(myfile, 'hello world0); fseek(myfileP, 0, SEEK_SET); fread(buffer, sizeof(buffer), 1, myfileP); fprintf(STDOUT, 'temp file contains '%s'0, buffer); fclose(myfileP); DESCRIPTION
This library function is part of Netpbm(1) pm_tmpfile() creates and opens an unnamed temporary file. It is basically the same thing as the standard C library tmpfile() function, except that it uses the TMPFILE environment variable to decide where to create the temporary file. If TMPFILE is not set or is set to something unusable (e.g. too long), pm_tmpfile() falls back to the value of the standard C library symbol P_tmpdir, just like tmpfile(). Unlike tmpfile(), pm_tmpfile() never returns NULL. If it fails, it issues a message to Standard Error and aborts the program, like most libnetpbm routines do. If you need to refer to the temporary file by name, use pm_make_tmpfile() instead. HISTORY
pm_tmpfile() was introduced in Netpbm 10.20 (January 2004). netpbm documentation 22 July 2004 Netpbm subroutine library: pm_tmpfile() function(3)
All times are GMT -4. The time now is 02:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy