12-05-2005
do you have linux installed. if yes try to use the cdecl utility
this is what i get
cdecl> explain int * *p()
declare p as function returning pointer to pointer to int
cdecl> explain int * &p()
Warning: Unsupported in C -- 'reference'
declare p as function returning reference to pointer to int
cdecl>
so int **func() is a function that returns a pointer to a pointer to int and int * & func() is a function that returns an reference to a pointer to a function, and as seen above the second statement is not supported in C, you can try it in c++ tho.
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to have the function keys available to me in my scripts. Anyone have any ideas on how to map these to functionality I design? :confused: (3 Replies)
Discussion started by: fjjlee
3 Replies
2. Shell Programming and Scripting
Hello Experts,
Is there any inbuild FLOOR function to do FLOOR func in mathmetics in awk script like in FlOOR Func in C.
Ex:- floor(2.9) = 2
floor(2.1) = 2
floor(2.0) = 2
floor(-2.0) = 2
floor(-2.1) = -3
floor(-2.9) =... (1 Reply)
Discussion started by: user_prady
1 Replies
3. UNIX for Dummies Questions & Answers
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies
4. Red Hat
</p>Download this video: Ogg Theora]
FUNC is the brainchild of Michael DeHaan, Adrian Likins, Seth Vidal, and Greg DeKoenigsberg. In this edition of Spotlight On, Michael, Adrian, and Seth discuss how FUNC makes it easy to write commands across large numbers of machines remotely and... (0 Replies)
Discussion started by: Linux Bot
0 Replies
5. Programming
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
Discussion started by: sehang
3 Replies
6. Shell Programming and Scripting
Hi!
I have a difficult problem, to step up a unknown version number in a text file, and save the file. It would be great to run script.sh and the version gets increased.
Example the content of the textfile.txt
hello
version = x
bye
This include three steps
1. First find the char after... (2 Replies)
Discussion started by: Beachboy72
2 Replies
7. Shell Programming and Scripting
Hi,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
LEARN ABOUT DEBIAN
bdflush
BDFLUSH(2) Linux Programmer's Manual BDFLUSH(2)
NAME
bdflush - start, flush, or tune buffer-dirty-flush daemon
SYNOPSIS
#include <sys/kdaemon.h>
int bdflush(int func, long *address);
int bdflush(int func, long data);
DESCRIPTION
Note: Since Linux 2.6, this system call is deprecated and does nothing. It is likely to disappear altogether in a future kernel release.
Nowadays, the task performed by bdflush() is handled by the kernel pdflush thread.
bdflush() starts, flushes, or tunes the buffer-dirty-flush daemon. Only a privileged process (one with the CAP_SYS_ADMIN capability) may
call bdflush().
If func is negative or 0, and no daemon has been started, then bdflush() enters the daemon code and never returns.
If func is 1, some dirty buffers are written to disk.
If func is 2 or more and is even (low bit is 0), then address is the address of a long word, and the tuning parameter numbered (func-2)/2
is returned to the caller in that address.
If func is 3 or more and is odd (low bit is 1), then data is a long word, and the kernel sets tuning parameter numbered (func-3)/2 to that
value.
The set of parameters, their values, and their valid ranges are defined in the Linux kernel source file fs/buffer.c.
RETURN VALUE
If func is negative or 0 and the daemon successfully starts, bdflush() never returns. Otherwise, the return value is 0 on success and -1
on failure, with errno set to indicate the error.
ERRORS
EBUSY An attempt was made to enter the daemon code after another process has already entered.
EFAULT address points outside your accessible address space.
EINVAL An attempt was made to read or write an invalid parameter number, or to write an invalid value to a parameter.
EPERM Caller does not have the CAP_SYS_ADMIN capability.
CONFORMING TO
bdflush() is Linux-specific and should not be used in programs intended to be portable.
SEE ALSO
fsync(2), sync(2), sync(8), update(8)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-03-05 BDFLUSH(2)