is zero it means `all of
remaining bytes in the file').
Why function fcntl so sensitive?
It isn't. You are not using it correctly.
--
Glynn Clements [EMAIL PROTECTED]
come with any documentation?
I really appreciate any feedback (sample source code/
pointers to internet sites ...)
There isn't any online documentation for Motif 2.*. SCO have the Motif
1.2 manual pages online, but ComboBox is specific to Motif 2.*.
--
Glynn Clements [EMAIL PROTECTED]
to stop
and the ping program will continue to ping other machine.
That doesn't make sense.
--
Glynn Clements [EMAIL PROTECTED]
/lib/libfoo.a) to the gcc command,
rather than using -lfoo.
so debug libraries are usually linked statically to the code, right?
Yep.
--
Glynn Clements [EMAIL PROTECTED]
.
--
Glynn Clements [EMAIL PROTECTED]
s? or do i
have to use X)
splitvt does this. Alternatively, you could try using a real text
editor :)
--
Glynn Clements [EMAIL PROTECTED]
tk() calls, and then
monitor the syslog output from user space.
--
Glynn Clements [EMAIL PROTECTED]
tools are the Info
documents. gcc and gdb both have sizeable Info files, as do make,
libc, and binutils.
In terms of tying everything together into a single environment,
XEmacs does a pretty good job.
If you aren't satisfied with XEmacs' gdb interface, there's DDD.
--
Glynn Clements [EMAIL
Augusto Cesar wrote:
I don't know where you can find xpm format doc's, but it is a start.
The Xpm distribution comes with documentation in the xpm.PS file,
although I wouldn't put it past distribution vendors to ship Xpm
without the docs.
--
Glynn Clements [EMAIL PROTECTED]
eed to use memcpy() for this; you could replace
memcpy ( (void*)i_f, (void*)f,4);
memcpy ( (void*)i_d1, (void*)d,4);
memcpy ( (void*)i_d2, (void*)((d)+4),4);
with
i_f = *(int *)f;
i_d1 = *(int *)d;
i_d2 = *((int *)d + 1);
--
Glynn Clements [EMAIL PROTECTED]
sort of printer you're talking to.
The command line arguments are specified in the printcap(5) manpage.
--
Glynn Clements [EMAIL PROTECTED]
.
Advanced Programming in the Unix Envionment
W Richard Stevens
Addison-Wesley
--
Glynn Clements [EMAIL PROTECTED]
Christoph Bugel wrote:
is there a way to do 'nm' on my kernel zImage,
or should I compile the kernel to another format?
You need to run `nm' on the uncompressed kernel (vmlinux).
--
Glynn Clements [EMAIL PROTECTED]
doesn't use libsocket; the socket functions are built into libc.
Likewise for libnsl.
Just remove the -lsocket and -lnsl options from the link command.
--
Glynn Clements [EMAIL PROTECTED]
numbers in binary.
--
Glynn Clements [EMAIL PROTECTED]
Richard Ivanowich wrote:
Is it just me or is spam really bad on this list.
It's just you. Over the past few months, the number of messages
discussing spam sent to this list exceeds the number of actual spams.
--
Glynn Clements [EMAIL PROTECTED]
command, I
didn't find any information of it.
man memcpy_tofs
no manual entry for memcpy_tofs
Internal kernel functions don't have manpages.
--
Glynn Clements [EMAIL PROTECTED]
an error (unless your compiler is seriously
broken). The return value will be silently converted to an int.
--
Glynn Clements [EMAIL PROTECTED]
are perfectly valid.
--
Glynn Clements [EMAIL PROTECTED]
computer on?'
--
Glynn Clements [EMAIL PROTECTED]
in my response to
your original posting of this question.
--
Glynn Clements [EMAIL PROTECTED]
not necessarily be a problem.
No doubt there are also other possibilities.
--
Glynn Clements [EMAIL PROTECTED]
/flex in
combination with bison/yacc, doing the high level parsing with the
latter.
For parsing more complex formats, yacc is (IMHO) the way to go.
However, in this particular case, the input format has a flat (i.e.
non-recursive) syntax, so I think that using yacc would be overkill.
--
Glynn
i++)
printf("%s\n", va_arg(va, char *));
va_end(va);
}
int main(void)
{
contrived(3, "hello", "there", "world");
return 0;
}
--
Glynn Clements [EMAIL PROTECTED]
to
nothing.
For more details, see the `make' info file (`C-h C-i make').
--
Glynn Clements [EMAIL PROTECTED]
. How do i do this???
It depends entirely upon the format of the file.
--
Glynn Clements [EMAIL PROTECTED]
yntax error: %s", buff);
continue;
}
/* do something with `name' and `number' */
}
A custom scanner built using lex will be more efficient, but it's
unlikely to be worth the effort in this case.
--
Glynn Clements [EMAIL PROTECTED]
is.
This introduces the potential for buffer overruns. The GNU tools
generate the warning:
the `gets' function is dangerous and should not be used.
if you try to use it. Use fgets() instead.
--
Glynn Clements [EMAIL PROTECTED]
from the filesystem (/dev/hda5) at all. how does it check
the partition, then?
is this maybe a technicality of strace? same reason that it doesn't
show the exec() after the fork()?
You need to use the -f switch if you want to trace child processes as
well as the parent.
--
Glynn Clements [EMAIL
--
Glynn Clements [EMAIL PROTECTED]
t's
due to something in the `//other functions' section.
--
Glynn Clements [EMAIL PROTECTED]
Henrik Nordstrom wrote:
Glynn Clements wrote:
I don't think that you should use select() on descriptors which are
non-blocking. You would normally either use select() or non-blocking
I/O, but not both.
I have to disagree here. Using select is REQUIRED when doing
non-blocking I/O
utilities. They nearly all use
getopt() for parsing the command line.
Also, the libc Info file has a couple of examples of using getopt().
--
Glynn Clements [EMAIL PROTECTED]
are unfamiliar with X programming, get a decent book.
--
Glynn Clements [EMAIL PROTECTED]
`19200' is the line speed, `ttyS0' is the serial port, and `dumb' is
the terminal type (used to initialise $TERM).
--
Glynn Clements [EMAIL PROTECTED]
n the line the daemon does something else?
This is difficult to do in a portable manner. You could try using the
TIOCMGET ioctl() to monitor the status lines; that may be adequate.
Alternatively, you could try polling for a lock file.
--
Glynn Clements [EMAIL PROTECTED]
minate any sooner.
#include unistd.h
#include signal.h
int main(void)
{
signal(SIGALRM, SIG_IGN);
usleep(10 * 100);
return 0;
}
--
Glynn Clements [EMAIL PROTECTED]
(buf.st_rdev)) /* st_rdev seemed the most sensible */
Why? I guess you were reading the `device type (if inode device)'
comment. st_rdev contains the major/minor numbers for devices; it
doesn't apply to any other inode type.
It should be
if (S_ISREG(buf.st_mode))
--
Glynn Clements [EMAIL PROTECTED]
an official way, but the address appears to be
available in the eax register, and also at ebp+56. I think that its
presence at ebp+56 may be deliberate (from setup_frame(), in
arch/i386/kernel/signal.c), while its presence in eax may be
accidental.
--
Glynn Clements [EMAIL PROTECTED]
#include signal.h
with
different stack, so chind process will get copy of global data and
copy of signal stack???
The child will need any signal context, as it will still be in a
signal handler after the fork.
--
Glynn Clements [EMAIL PROTECTED]
o the pipe.
--
Glynn Clements [EMAIL PROTECTED]
(which happens alot and perfectly too) win[0] fails to respond.
I have no idea how this could happen, can anyone help?
Can you provide a complete (compilable) example?
--
Glynn Clements [EMAIL PROTECTED]
Shekhar Shenvikerkar wrote:
I used the getmouse() function from the ncurses library.
But the function is not working.
Have you used the mousemask() function to enable mouse events? They
aren't enabled by default.
--
Glynn Clements [EMAIL PROTECTED]
or switch to using a real-time OS.
--
Glynn Clements [EMAIL PROTECTED]
-space processes of
CPU time (or am I overlooking something?)
--
Glynn Clements [EMAIL PROTECTED]
but.. in the while(...) donĀ“t
specifies any function. Wich function expects while(...) to return 1 to
exit loop?
The above loop will never terminate.
--
Glynn Clements [EMAIL PROTECTED]
recommend a good C reference book (reference, not tutorial...)
The C Programming Language (2nd Edition)
Brian W Kernighan Dennis M Ritchie
Prentice Hall
Note that this doesn't cover style. You can't really have a
`reference' book for style.
--
Glynn Clements [EMAIL
program (sendmail, procmail etc) tries to
fiddle with the locked mail spool, do they just hang around waiting?
Yes, although procmail will apparently override the lockfile after a
certain amount of time. However, fcntl() locks won't be (can't be)
overriden.
--
Glynn Clements [EMAIL PROTECTED]
Richard Ivanowich wrote:
Does anyone know how to make a TSR program.
Linux doesn't support the DOS-specific concept of TSR programs. What
sort of functionality are you trying to obtain?
--
Glynn Clements [EMAIL PROTECTED]
in order to harvest the email addresses of people who post
to it. The only way to prevent that is to never post to mailing lists
using your correct email address.
--
Glynn Clements [EMAIL PROTECTED]
that there are plans to implement
this feature.
--
Glynn Clements [EMAIL PROTECTED]
)
{
*tmp += 5;
}
Yep. And if you compare the code which is generated, it will be
identical to using a reference.
--
Glynn Clements [EMAIL PROTECTED]
files
correcty,
but when I go back to change dates on the restored data, I cannot do it
for symbolic links.
No, you can't.
--
Glynn Clements [EMAIL PROTECTED]
f SA_ONESHOT | SA_NODEFER. The BSD
version is equivalent to using sigaction() with an sa_flags field of
SA_RESTART.
In any event I found that by by using the flag:
newaction.sa_flags = SA_ONESHOT;
Which is what you should be doing.
in the above program causes the default behavior to
server_bar.o
prog2: client_foo.o client_bar.o
--
Glynn Clements [EMAIL PROTECTED]
() or even getch()?
curses provides a getch() function. However, if the program was
written for DOS, you may need to make many other changes to get it to
run on a different OS.
If you are just starting to learn C, you would be better off with a
book that isn't DOS-specific.
--
Glynn Clements
andalone Info
reader is really poor.
--
Glynn Clements [EMAIL PROTECTED]
.
--
Glynn Clements [EMAIL PROTECTED]
is bloated
instead...
I actually use some of XEmacs' extra features (e.g. inline images in
MIME-email and HTML).
--
Glynn Clements [EMAIL PROTECTED]
may not allow the
process to access the file).
You can determine whether the process can access the file using
access().
Also, you need to have execute permission on all of the parent
directories in order to be able to discover anything about a file
(including whether it exists).
--
Glynn
); /* pass a pointer to `n' */
printf("n = %d\n", n);
}
--
Glynn Clements [EMAIL PROTECTED]
yone knows if these are documented
online anywhere, could they let me know.)
--
Glynn Clements [EMAIL PROTECTED]
t clearing it, so you can create a new page by drawing on top of
the previous one.
Also, ghostscript's X11 driver shows the page as it's being
constructed; you don't need a showpage or copypage to get it
displayed.
--
Glynn Clements [EMAIL PROTECTED]
d a sample on
how to read the file, and retrieve both
Field and Value
You can read a line from a stream (i.e. a `FILE *') with fgets(), and
you can get a pointer to the first occurrence of a particular
character using strchr().
--
Glynn Clements [EMAIL PROTECTED]
need to open() the file and then use fstat() on the descriptor.
--
Glynn Clements [EMAIL PROTECTED]
usage/docs/urls for this library?
It's part of the ext2fs tools. I don't know if there is any
documentation for it (other than the source code).
--
Glynn Clements [EMAIL PROTECTED]
to a XmDrawingAreaCallbackStruct:
typedef struct
{
int reason;
XEvent * event;
Window window;
} XmDrawingAreaCallbackStruct;
You can get the mouse coordinates from the `event' field.
--
Glynn Clements [EMAIL PROTECTED]
abilities aren't all that good.
--
Glynn Clements [EMAIL PROTECTED]
Pete Ryland wrote:
On Sat, 23 May 1998, Glynn Clements wrote:
Personally, I avoid using `!strcmp(...)'; I find `strcmp(...) == 0' to
be more intuitive.
__Personally__ I like the opposite ;-). I always use ! when I can. It' s
faster and nicer.
Don't be fooled! Just because
s2)
{
return strcmp(s1, s2) == 0;
}
--
Glynn Clements [EMAIL PROTECTED]
t), and `equal'
(which tells you whether the objects are equal). Likewise with Java;
you have both `==' (reference equality) and `equals' (value equality).
The only languages where there is no difference are pure functional
languages (e.g. Haskell, Hope), where there is no notion of mutable
state.
--
Glynn Clements [EMAIL PROTECTED]
to-an-int;
ptr_char char-pointer;
Yes, but if you wanted it to work for all types, c-2.h would be
infinitely long.
I would agree that C's type syntax is probably not one of its better
features, although it probably seemed like a good idea at the time.
The syntax of function types is particul
for
which the callback is invoked?
Under what circumstances do you want the function to be called?
Widget callbacks are called whenever something interesting happens to
the widget, so it's inevitable that they associated with a specific
widget.
--
Glynn Clements [EMAIL PROTECTED]
packages is the Linux Archive Search:
http://torgo.ml.org/las
--
Glynn Clements [EMAIL PROTECTED]
now). I havent tried
this yet, though.
The standard way to permanently drop all root privileges on Linux is
to call `setuid(getuid())'.
--
Glynn Clements [EMAIL PROTECTED]
event.
--
Glynn Clements [EMAIL PROTECTED]
every user on
the system to obtain full root privileges; i.e. they will be able to
execute any command whatsoever as root.
--
Glynn Clements [EMAIL PROTECTED]
make your code not
portable.
Using ! to check for a NULL pointer is entirely portable.
--
Glynn Clements [EMAIL PROTECTED]
are set up to be
the connected socket. That means you should probably skip steps 6, 7
and 8.
If the program is being started from inetd, you shouldn't need to do
any of this.
--
Glynn Clements [EMAIL PROTECTED]
.
--
Glynn Clements [EMAIL PROTECTED]
of testing for a null
pointer??
Using `!p' is sufficient. If you use `p != NULL', you need to include
stdio.h to ensure that NULL is defined, which is kind of overkill if
you're not using anything else from stdio.h.
--
Glynn Clements [EMAIL PROTECTED]
ts in
the FIN_WAIT_2 state.
The RFC-specified behaviour would seem to suffer from the problem that
if the remote end crashes, the local socket would be stuck in the
FIN_WAIT_2 state forever.
--
Glynn Clements [EMAIL PROTECTED]
won't. Most systems use an
all-zeroes bit pattern for NULL. I personally don't know of a system
which doesn't.
--
Glynn Clements [EMAIL PROTECTED]
Salil Kumar wrote:
I have the block device name for disk, I want to find out associated raw
device name.
What do you mean by the `raw device'?
--
Glynn Clements [EMAIL PROTECTED]
code work everywhere :
char *p;
p = malloc( 10);
p += 4;
free( p);
No. The argument to free() should be a pointer which was previously
returned from malloc(), calloc() or realloc(). The behaviour when
passing any other value is undefined.
--
Glynn Clements [EMAIL PROTECTED]
are, though.
--
Glynn Clements [EMAIL PROTECTED]
re details.
--
Glynn Clements [EMAIL PROTECTED]
James wrote:
- int main(int argc, char **argv, char **envp)
this one's new to me... don't tell me, **envp points to a string of all the
environment variables..
Yep. It should be identical to the global variable `environ'.
--
Glynn Clements [EMAIL PROTECTED]
.
--
Glynn Clements [EMAIL PROTECTED]
OS is this on? It doesn't look like anything that I've seen on
Linux.
--
Glynn Clements [EMAIL PROTECTED]
consoles and dumb terminals. I often use ed for
editing files over a slow telnet link.
--
Glynn Clements [EMAIL PROTECTED]
`dircolors' uses.
--
Glynn Clements [EMAIL PROTECTED]
perror("write");
exit(1);
}
--
Glynn Clements [EMAIL PROTECTED]
of system headers.
I don't know about SunOS. On Linux, libpthread redefines various libc
functions. Linking against libpthread will cause problems if the
executable or another library wasn't compiled for a multithreaded
environment.
--
Glynn Clements [EMAIL PROTECTED]
in the array? If not, the
undefined elements (which will be all zeroes) will come first. E.g. if
you have 10 defined elements, after the qsort, the 14990 undefined
elements will come first, and the 10 defined elements will be at the
end of the array.
--
Glynn Clements [EMAIL PROTECTED]
? 2/4/8?
Tab stops should always be 8 characters. The indent level is entirely
a matter of personal preference.
IOW, if you want to indent by something other than 8 spaces, use
spaces. Don't create source files which require the tab width to be
set to something other than 8.
--
Glynn Clements
dereference it twice, e.g. with
(*PasswordList)[i]
or
PasswordList[0][i]
And
sizeof(*PasswordList)
would be equal to
20 * sizeof(pwlistentry)
so
PasswordList++
would increment PasswordList by
20 * sizeof(pwlistentry)
bytes.
--
Glynn Clements
mmand line; however, this is risky, as it will show up in the
output of `ps'.
You can either use expect to script an interactive session, or you can
get the util-linux source and modify passwd to read the password from
stdin (it currently reads it directly from the controlling tty).
--
Glynn Cleme
= list;
if (list)
list-prev = new_item;
return new_item;
}
--
Glynn Clements [EMAIL PROTECTED]
that you will need to dig around in the process'
/proc/pid directory.
Note that malloc() can allocate non-contiguous chunks of memory using
anonymous mmap(), as well as by using brk().
--
Glynn Clements [EMAIL PROTECTED]
1 - 100 of 310 matches
Mail list logo