10-04-2012
That would be basePtr, one would think.
You can't make it a const as you'll need to change it at least once, when you allocate memory to it.
8 More Discussions You Might Find Interesting
1. Programming
Hi,
I am implementing a shell in C, with the following problem...
Suppose the shell is invoked from the command line as
>> myshell < test.in > test.out 2>&1
I have to execute the commands in test.in and redirect them to test.out
How does one detect in the main function that the shell... (1 Reply)
Discussion started by: jacques83
1 Replies
2. Programming
helo can u tell me what do you mean by stack winding and stack unwinding
Regards,
Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies
3. Programming
Hello,
I am trying to implement TCP protocol in C.
I have read the RFC for TCP and have knowledge about it.
But I am stuck in coding.
Are ther any reference links, code snippets available for reference? (1 Reply)
Discussion started by: Harsh
1 Replies
4. Shell Programming and Scripting
I am trying to implement a login screen to the following code how would i go about doing so. I have try to place the password in a variable using if statements which would usually work but as i have the system in a while loop i think i need to find another method.
#!/bin/bash
#Filename:... (4 Replies)
Discussion started by: warlock129
4 Replies
5. Shell Programming and Scripting
I'm trying to add logging to an existing script which echos a number of lines to the screen. I've added a switch to the script that is going to suppress much of this output and put it in a file instead.
The way I envisioned it was like this:
$log would be set to either "" or the log files... (8 Replies)
Discussion started by: cheetobandito
8 Replies
6. Shell Programming and Scripting
i have following input file...
00290002STDR000000000000000000000000000EOD END TRANSACTION ^@^@^@^@^@^@^@^@^@^@^@^@^
00299998STDR070000000007000000000000000STANDING DEBITS ^@^@^@^@^@^@^@^@^@^@^@^@^... (1 Reply)
Discussion started by: sagarrd
1 Replies
7. Shell Programming and Scripting
Hello All,
I am trying a shell script for automatically login to test servers and pulling the output of top command from all using expect.
----snippet of code ---
#!/usr/bin/expect -f
#!/bin/bash
server1=10.251.222.51
server=("$server1")
i=1
for exp_server in ${server}; do
expect -c... (3 Replies)
Discussion started by: Renjesh
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am new to the linux kernel development area. I want to know what is the difference between kernel mode stack and user mode stack? Does each process has a user mode stack and a kernel mode stack?? Or Each process has a user mode stack and there is only one kernel mode stack that is shared by... (4 Replies)
Discussion started by: saurabhkoar
4 Replies
LEARN ABOUT DEBIAN
optionsavestate
optionSaveState(3) Programmer's Manual optionSaveState(3)
NAME
optionSaveState - saves the option state to memory
SYNOPSIS
#include <your-opts.h>
cc [...] -o outfile infile.c -lopts [...]
void optionSaveState(tOptions* pOpts);
DESCRIPTION
This routine will allocate enough memory to save the current option processing state. If this routine has been called before, that memory
will be reused. You may only save one copy of the option state. This routine may be called before optionProcess(3AO). If you do call it
before the first call to optionProcess, then you may also change the contents of argc/argv after you call optionRestore(3AO)
In fact, more strongly put: it is safest to only use this function before having processed any options. In particular, the saving and
restoring of stacked string arguments and hierarchical values is disabled. The values are not saved.
pOpts program options descriptor
ERRORS
If it fails to allocate the memory, it will print a message to stderr and exit. Otherwise, it will always succeed.
SEE ALSO
The info documentation for the -lopts library.
ao_string_tokenize(3), configFileLoad(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3),
optionLoadLine(3), optionNextValue(3), optionOnlyUsage(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionUnloadNested(3),
optionVersion(3), pathfind(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),
2011-07-10 optionSaveState(3)