Hello Friends,
I got stuck with fgets () & rewind() function .. Please need help..
Actually I am doing a like,
The function should read lines from a txt file until the function is called..
If the data from the txt file ends then it goes to the top and then again when the function is called... (1 Reply)
Discussion started by: user_prady
1 Replies
3. Forum Support Area for Unregistered Users & Account Problems
I have an old file originally created in vi but read and saved by a word processor at some point.
I have ^Ms and know how to substitute them for anything I wish but I still only have one long line when viewed in vi.
So I suppose I need to substitute a newline for each ^M but I don't know the... (2 Replies)
Assume client send the message " Hello ", i get output such as
Sent mesg: hello
Bytes Sent to Client: 6
bytes_received = recv(clientSockD, data, MAX_DATA, 0);
if(bytes_received)
{
send(clientSockD, data, bytes_received, 0);
data = '\0';... (2 Replies)
Hi all,
I have this method to read a string from a STDIN:
void readLine(char* inputBuffer){
fgets (inputBuffer, MAX_LINE, stdin);
fflush(stdin);
/* remove '\n' char from string */
if(strlen(inputBuffer) != 0)
inputBuffer = '\0';
}
All work fine but if i... (1 Reply)
for i in `seq 1 10 ` ; do
printf $i '\n';
done
gives me this:
1234567891064mbarch ~ $ (output followed by bash prompt) :(
I've tried so many ways to create a newline at the end. Does anyone have any ideas.. Thanks in advance. Sorry (7 Replies)
I've been having trouble with reading past the end-of-file in C. Can anyone find my stupid mistake?
This is the minimal code needed to cause the error for me:
FILE *f = fopen(name, "r");
if (!f)
return;
pari_sp ltop = avma;
char line;
while(fgets(line, 1100, f) != NULL)
printf(".");... (23 Replies)
Hi,
I have a string like this,
char str ="This, a sample string.\\nThis is the second line, \\n \\n, we will have one blank line";
if I want to use strtok() to seperate the string, which token should I use?
I tried "\n", "\\n", either not working.
peter (1 Reply)
I am trying to make a download progress meter with bash and I need to echo a percentage without making a newline and without concatenating to the last output line.
The output should replace the last output line in the terminal.
This is something you see when wget or curl downloads files.... (6 Replies)
I have requirement to remove the /n ( newline ) characters from the file.
When I open file in VI .. I want to see newline char
how to display newline char .. or where can I see the content with newline char visible? (3 Replies)
Discussion started by: freakabhi
3 Replies
LEARN ABOUT DEBIAN
pvmfstartpvmd
START_PVMD(3PVM) PVM Version 3.4 START_PVMD(3PVM)NAME
pvm_start_pvmd - Starts new PVM daemon.
SYNOPSIS
C int info = pvm_start_pvmd( int argc, char **argv, int block )
Fortran call pvmfstartpvmd( args, block, info )
PARAMETERS
argc Number of arguments in argv.
argv An array of arguments to the executable.
args A character string containing the arguments to the executable.
args A character string containing the arguments to the executable.
block Integer specifying whether to block until startup of all hosts complete or return immediately.
info Integer returning the error code.
DESCRIPTION
The routine pvm_start_pvmd starts up a pvmd3 process, the master of a new virtual machine. It returns as soon as the pvmd is started and
ready for work. If the block parameter is nonzero and a hostfile is passed to the pvmd as a parameter, it returns when all hosts marked to
start have been added. pvm_start_pvmd returns zero on success.
If PVM is compiled to allow running more than one pvmd per host, a task calling pvm_start_pvmd before any other pvm functions will connect
to the pvmd that it starts. pvm_start_pvmd sets environment variable PVMSOCK to the address printed by the pvmd as it starts up.
EXAMPLES
C:
static char *argv[] = {
"-d41",
"/u/jones/pvmd_hosts",
};
argc = 2
info = pvm_start_pvmd( argc, argv, block );
Fortran:
CALL PVMFSTART_PVMD( '-d41 /u/jones/pvmd_hosts', BLOCK, INFO )
EXAMPLES
C:
static char *argv[] = {
"-d41",
"/u/jones/pvmd_hosts",
};
argc = 2
info = pvm_start_pvmd( argc, argv, block );
Fortran:
CALL PVMFSTART_PVMD( '-d41 /u/jones/pvmd_hosts', BLOCK, INFO )
ERRORS
The following error conditions can be returned
PvmDupHost
A pvmd is already running.
PvmSysErr
The local pvmd is not responding.
SEE ALSO pvm_addhosts(3PVM), pvmd3(1PVM)pvmd3(1PVM)
11 December, 1995 START_PVMD(3PVM)