Linux-Development-Sys Digest #631, Volume #8 Wed, 11 Apr 01 11:13:10 EDT
Contents:
Re: Need your recommendation for a full-featured text editor (Roberto Selbach
Teixeira)
Re: Development of Server in RedHat (Nix)
Re: usleep() is unreliable when sleeping for less then 10000 micro (Pasztor Szilard)
Re: usleep() is unreliable when sleeping for less then 10000 micro (Rolf Magnus)
Accessing PCI device from user space ("Slawek Grajewski")
Re: Development of Server in RedHat ("Jan Hoffer")
Re: Need your recommendation for a full-featured text editor
([EMAIL PROTECTED])
make config ("ja")
Re: Accessing PCI device from user space (Grant Edwards)
Re: Virtual Terminal (Kasper Dupont)
Re: Need your recommendation for a full-featured text editor (Thore B. Karlsen)
Re: Newbee System crash-help ("Gregory Andrew Ellison")
How to blank the screen in C? (Paul Haley)
Re: How to blank the screen in C? ("Zoran Cutura")
Re: Can we can change HZ from 100 to 10000? (Kasper Dupont)
Re: usleep() is unreliable when sleeping for less then 10000 micro (Pasztor Szilard)
SIGNAL & SA_RESTORER (Mikael Chambon)
Re: Installing Linux applications.... !! (Jan Atle Ramsli)
Re: Need your recommendation for a full-featured text editor (Roberto Selbach
Teixeira)
Re: Need your recommendation for a full-featured text editor (Craig Kelley)
----------------------------------------------------------------------------
From: Roberto Selbach Teixeira <[EMAIL PROTECTED]>
Crossposted-To:
24hoursupport.helpdesk,alt.comp.shareware.programmer,comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: 11 Apr 2001 09:04:05 -0300
On Tue, 10 Apr 2001, [EMAIL PROTECTED] wrote:
> On Tue, 10 Apr 2001 16:22:26 GMT, Randall Parker <[EMAIL PROTECTED]>
> wrote:
>
>>> Sure, Emacs is configurable, but only with a lot of work. And even
>>> then it might not be the right editor for you, so it's not the
>>> right answer for everyone.
>
>>The reason I've never tried Emacs is that some of the people who
>>have claim that it is hard to configure. Then you find people who
>>say it is easy to configure but one has no way of knowing how long
>>they've used it and how long it took them to get to the point where
>>they'd call it easy.
>
> It _is_ hard to configure, unless you happen to be so insane as to
> like the emacs defaults. I don't. I don't dismiss emacs as being
> useless, but the emacs defaults are so far off from anything I would
> consider useful that it just takes too much work to get it to work
> _with_ me, instead of _against_ me. Emacs out of the box is just as
> annoying to me as the Microsoft Office paper clip. It just tries to
> do too much. The difference is that the Office assistant is
> intelligent enough to understand when it's not wanted, while emacs
> isn't.
Maybe you just don't know "Customize". Try using it to configure Emacs
and you will see how "difficult" it is. Customize offers a interface
for customization that don't require a single line of code or to edit
a file. The user doesn't even have to know in which file the
customization goes.
As for Emacs defaults, I agree with you that they are not the best for
everyone. But all you have to do is using the menu Options->Customize
Emacs to change the whole thing.
>>I want to install an editor, go to a menu pop-down that is labelled
>>something like "Key Mappings" and then get a dialog box that has
>>radio buttons or a combo box that lets me select from a half dozen
>>popular key mappings (vi, Brief, CUA, etc). If it requires
>>downloading separate Lisp scripts and trying to understand the guts
>>of hacked up Lisp macros to get it to work right then I'm really not
>>interested.
>
That's Customize for you.
> vim is _very_ easy to configure. You have good help files that are
> easy to maneuver, and the customization screens in emacs don't hold
> a candle to the ease of use and maneuverability of the corresponding
> screens in vim.
Vim requires the user to edit configuration files which use a very
obscure syntax. As for documentation, try Help->Read the Emacs Manual
to see a real good documentation.
--
Roberto Selbach Teixeira [EMAIL PROTECTED]
Conectiva, S.A. http://www.conectiva.com
You may think that there is nothing you need to know about Vi.
Don't fool yourself, there is at least one thing you positively
*have* to know about Vi:
Pressing lots of ESC's followed by ":q!" will quit the damn thing.
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Development of Server in RedHat
Date: 11 Apr 2001 08:14:12 +0100
On Wed, 11 Apr 2001, Philip Van Hoof stated:
> In linux you have symlinks so the redhat folks made another dir
> called /etc/rc.d/init.d where all the possible scripts resist..
This is an old, old idea. It wasn't invented by RH.
> They symlink
> /etc/rc.d/rc2.d/S01something to /etc/rc.d/init.d/something
> if the script must be executed at startup ... and
> /etc/rc.d/rc2.d/K01something to /etc/rc.d/init.d/something
> if the script must not be executed but only showed in these
> tools..
?!?!?! No!
/etc/rc.d/rcN.d/S{number}{name} means `run this script after all scripts
with lower number, to start things', and
/etc/rc.d/rcN.d/S{number}{name} means `run this script after all scripts
with lower number, to stop things'.
So the K* scripts list things that should *not* be running in this
runlevel; the scripts most emphatically *are* executed.
--
Rusks for Peace!
------------------------------
From: Pasztor Szilard <[EMAIL PROTECTED]>
Subject: Re: usleep() is unreliable when sleeping for less then 10000 micro
Date: 11 Apr 2001 13:14:42 GMT
[EMAIL PROTECTED]:
>>If i want busy wait i can do it without nanosleep...
>
> How is that relevant?
One would think that nanosleep could be used to give the cpu back for a
certain amount of time. Instead, at small delays, it only does the same busy
wait as anyone could and of course the aim of nanosleep usage would be to
replace the dumb busy waits.
-----------------------------------------------------------------------
| People can be divided into two categories: |
| Those who divide people into two categories, and those who don't. |
-----------------------------------------------------------------------
------------------------------
From: Rolf Magnus <[EMAIL PROTECTED]>
Subject: Re: usleep() is unreliable when sleeping for less then 10000 micro
Date: Wed, 11 Apr 2001 15:24:02 +0200
Pasztor Szilard wrote:
> [EMAIL PROTECTED]:
>>>If i want busy wait i can do it without nanosleep...
>>
>> How is that relevant?
>
> One would think that nanosleep could be used to give the cpu back for a
> certain amount of time. Instead, at small delays, it only does the same
> busy wait as anyone could and of course the aim of nanosleep usage would
> be to replace the dumb busy waits.
How much (besides the three context switches) can be done in a few
microseconds?
------------------------------
From: "Slawek Grajewski" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Accessing PCI device from user space
Date: Wed, 11 Apr 2001 15:32:41 +0200
Hello,
I'm looking for hints on how to map memory of a PCI card into a user process
address space. I just want to have direct access to this memory without
kernel/user mode copying. Anyone has an idea?
TIA,
Slawek
------------------------------
From: "Jan Hoffer" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Development of Server in RedHat
Date: Wed, 11 Apr 2001 15:48:38 +0200
Hi,
is there perhapse another much simple solution for the problem, where I have
not to develope any server application....?
Thanks a lot
Julia
"Julia Donawald" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:9b08c4$7827c$[EMAIL PROTECTED]...
> Hi,
> till now I have only developed applications in Windows, but now I get more
> and more interested in Linux, so I have installed a RedHat 7.0 Linux
> Distribution on my PC. I now have to develope the following application
and
> need therefore some information:
> 1.) How to develope an internet server tool, that means I want to create a
> program that receives data from a client through the internet.
> 2.) The data from the client I have to put in an mySQL Database.
> 3.) How can I make the server run all the time, when the linux-server
> starts.
> That means where can I find some samples or other information on these two
> problems. In fact I am also really interested, if this is a complex
problem
> in linux and which libarys ( in C++ ) I could use to simplify my work. I
> know that I can search with some searchengines, but I am a really newbie
in
> linux and so have no detailed idea for what to search exactly.
>
> Thanks a lot in advance
> Julia
>
> P.S. Sorry for my bad english
>
>
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To:
comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy,alt.comp.shareware.programmer
Subject: Re: Need your recommendation for a full-featured text editor
Date: Wed, 11 Apr 2001 13:54:19 GMT
On Tue, 10 Apr 2001 18:14:53, Dave Martel <[EMAIL PROTECTED]>
wrote: WEEKDAY
#On Tue, 10 Apr 2001 10:58:12 -0700, "Dan Miller" <[EMAIL PROTECTED]>
#wrote:
#
#Multiedit is $129 but I don't believe they make a linux version. The
#version number hasn't been changed for quite some time, leading me to
#wonder if they're continuing to improve it.
#
ME 9 was announced for this month.
Too bad they restricted themselves to MicroTrash.
We used the DOS version until it became Windows only.
--
Remove -zamboni to reply
All the above is hearsay and the opinion of no one in particular
------------------------------
From: "ja" <[EMAIL PROTECTED]>
Subject: make config
Date: Wed, 11 Apr 2001 21:58:31 +0800
my system redhat7.0
kernel 2.2.16
I extract pcmcia-cs-3.1.15 at /usr/src/linux
make config
why can I input "/usr/src/linux" as my linux source directory?
configuration failed appear~
why?????????
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Accessing PCI device from user space
Date: Wed, 11 Apr 2001 14:11:46 GMT
In article <9b1mds$[EMAIL PROTECTED]>, Slawek Grajewski wrote:
>I'm looking for hints on how to map memory of a PCI card into a user process
>address space. I just want to have direct access to this memory without
>kernel/user mode copying. Anyone has an idea?
Write a driver module for the board that impliments the mmap()
call. An example can be found at:
ftp://ftp.visi.com/users/grante/stuff/demomm.tar.gz
You might want read previous threads on this subject -- it was
discussed quite a bit in the last few weeks.
--
Grant Edwards grante Yow! Ha ha Ha ha Ha ha
at Ha Ha Ha Ha -- When will I
visi.com EVER stop HAVING FUN?!!
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Virtual Terminal
Date: Wed, 11 Apr 2001 14:18:42 +0000
Marcello Botrugno wrote:
>
> Hi all,
> I have an application with character interface. My problem is to know, at a
> given time,
> if the current virtual Terminal (Ctrl+F1..n) is the one on which my
> application is running.
> I know that under SCO it is possible to receve a signal when the application
> looses/gets the focus. Do you know if it is possible to get the same
> beaviour under Linux ?.
>
> Tanks
This piece of code will return the number of the
VT currently displayed on the screen.
static inline int activ(int fd)
{
struct vt_stat t;
t.v_active=-1;
if (ioctl(fd,VT_GETSTATE,&t)) return -1;
return t.v_active;
}
You can get the device major/minor number of your
controling tty from /proc/self/stat. I have some
code doing this on a CD somewhere, I will post it
when I have found it.
The X server changes the mode of the VGA card
when you switch to/from its VT. I don't know the
details about how this works, but in short the
idea is that X asks the kernel to be signaled,
the kernel signals the X server when changing
to/from its VT and the X server has to acknowledge
this signal before the switch will complete. Try
stracing XFree86 to see how this works.
The VT can do lot of other good stuff, try looking
for VT_ in the ioctl_list man page. There are also
lots of escape codes you can write to a VT of the
form, e.g. printf("\033[12;42]"); would switch to
VT number 42 if it is open. I don't know any
documentation of theese sequences, read the source
if you need to know what you can do.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Thore B. Karlsen)
Crossposted-To:
24hoursupport.helpdesk,alt.comp.shareware.programmer,comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: Wed, 11 Apr 2001 14:31:20 GMT
Reply-To: [EMAIL PROTECTED]
On 11 Apr 2001 09:04:05 -0300, Roberto Selbach Teixeira
<[EMAIL PROTECTED]> wrote:
>> It _is_ hard to configure, unless you happen to be so insane as to
>> like the emacs defaults. I don't. I don't dismiss emacs as being
>> useless, but the emacs defaults are so far off from anything I would
>> consider useful that it just takes too much work to get it to work
>> _with_ me, instead of _against_ me. Emacs out of the box is just as
>> annoying to me as the Microsoft Office paper clip. It just tries to
>> do too much. The difference is that the Office assistant is
>> intelligent enough to understand when it's not wanted, while emacs
>> isn't.
>Maybe you just don't know "Customize". Try using it to configure Emacs
>and you will see how "difficult" it is. Customize offers a interface
>for customization that don't require a single line of code or to edit
>a file. The user doesn't even have to know in which file the
>customization goes.
Don't patronize me. Of course I know about customize. First of all it sucks,
and second -- it's not enough. You need more modification than just fiddling
around in customize to make emacs useable.
>As for Emacs defaults, I agree with you that they are not the best for
>everyone. But all you have to do is using the menu Options->Customize
>Emacs to change the whole thing.
Not "the whole thing". Absolutely not.
>> vim is _very_ easy to configure. You have good help files that are
>> easy to maneuver, and the customization screens in emacs don't hold
>> a candle to the ease of use and maneuverability of the corresponding
>> screens in vim.
>Vim requires the user to edit configuration files which use a very
>obscure syntax. As for documentation, try Help->Read the Emacs Manual
>to see a real good documentation.
Have you tried :options? Apparently not.
--
"By the time we've finished with him, he won't know whether
he's Number Six or the cube root of infinity!"
------------------------------
From: "Gregory Andrew Ellison" <[EMAIL PROTECTED]>
Subject: Re: Newbee System crash-help
Date: Wed, 11 Apr 2001 22:34:06 +0800
Just to save anyone the bother,Ive decided to re-install. I think I've
completely stuffed the file system.
As a matter of interest,can any one tell me if there is a HOWTO or something
similar that describes how to tackle a system corruption and any rescue
methods
Thanks
"Gregory Andrew Ellison" <[EMAIL PROTECTED]> wrote in message
news:frSA6.837$[EMAIL PROTECTED]...
> HI, Like a babe in the woods i ignored the advice to compile and make
> install glibc2.2 in a build dir and now my system has crashed and I can't
> fix it.
> When I boot it tells me it can't find libtermcap.so.2
> Is there any way I can use rescue or expert mode to get back into
/usr/src/
> and undo what I've done.
> Oh woe is me.
>
>
------------------------------
Subject: How to blank the screen in C?
From: [EMAIL PROTECTED] (Paul Haley)
Date: Wed, 11 Apr 2001 14:14:24 GMT
I'm working on a small project here and need to be able to blank the screen
and bring it back when necessary. Does anybody have any sample code?
Thanks,
Paul Haley
------------------------------
From: "Zoran Cutura" <[EMAIL PROTECTED]>
Subject: Re: How to blank the screen in C?
Date: Wed, 11 Apr 2001 16:38:11 +0200
Reply-To: [EMAIL PROTECTED]
Once upon a while "Paul Haley" <[EMAIL PROTECTED]> wrote:
> I'm working on a small project here and need to be able to
> blank the screen and bring it back when necessary. Does
> anybody have any sample code?
>
> Thanks,
> Paul Haley
You'll want to use the ncurses library. Try man ncurses or man
curses, depending on your system.
--
Z ([EMAIL PROTECTED])
"LISP is worth learning for the profound enlightenment experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days." -- Eric S. Raymond
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Can we can change HZ from 100 to 10000?
Date: Wed, 11 Apr 2001 14:42:09 +0000
tlin wrote:
>
> hi,
>
> I am using 2.2.16 kernel with HZ=100. Can I change it to 10000
> so that I can get a smaller time interval? Thanks!
>
> tlin
I once tried this on a RedHat 6.0 system with 2.2.16.
The kernel still worked, but some userspace programs
did not. A 350 MHz K6/2 seems to be fast enough to
handle 10000 timer interrrupts pr. second.
I have also tried with 1000 and used it without
problems for some time. It however turned out that I
could not use the DAO option when writing CDs.
--
Kasper Dupont
------------------------------
From: Pasztor Szilard <[EMAIL PROTECTED]>
Subject: Re: usleep() is unreliable when sleeping for less then 10000 micro
Date: 11 Apr 2001 14:43:46 GMT
Rolf:
>> One would think that nanosleep could be used to give the cpu back for a
>> certain amount of time. Instead, at small delays, it only does the same
>> busy wait as anyone could and of course the aim of nanosleep usage would
>> be to replace the dumb busy waits.
>
> How much (besides the three context switches) can be done in a few
> microseconds?
Busy waits were reported to be used up to 2 ms, that is, 2 milliseconds.
That's about 2 million clock cycles for a GHz cpu.
-----------------------------------------------------------------------
| WinErr: 01B Illegal error - You are not allowed to get this error. |
-----------------------------------------------------------------------
------------------------------
From: Mikael Chambon <[EMAIL PROTECTED]>
Subject: SIGNAL & SA_RESTORER
Date: Wed, 11 Apr 2001 16:46:04 +0200
Hi,
Does someone know what SA_RESTORER flag means ? There is no
description of this flag in signal.h and I saw that it is very used
in the function setup_frame....
Thanks ....
--
Mikael Chambon
------------------------------
Date: Wed, 11 Apr 2001 17:57:26 +0200
From: Jan Atle Ramsli <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Installing Linux applications.... !!
[EMAIL PROTECTED] wrote:
>
> In article <9avnma$1qq$[EMAIL PROTECTED]>, Karim A <[EMAIL PROTECTED]> wrote:
>
> >I've developped an application for Linux under Gnome env.
> >Now I'd like to provide users a script to install it.
> >But I'm not "very" experienced with scripting.
> >I've always developped under Windwos and I don't know if it exist install
> >tools for Linux such like InstallShield.
> >
> >In fact, I'd like to know how to set permanently env variables in .xxxRC
> >files. I alwas get permissions errors etc.
> >
> >So, does anyone knows where I can find tutorials about writing install
> >scripts, setting up env variables etc...
>
> A good place to start would be the rpm howto document.
Also, I guess that it is worth mentioning that 'InstallShield-type'
programs are not part of Linux - Linux is Unix.
There are several major package formats:
tar.gz or tgz - the oldest (?) install format, and still most used for
source code (?)
This one is used by Slackware, wchich is said to be the most 'Unix-like'
distro.
A new app should be packaged in tgz (at least the source distro).
rpm - Used by RedHat, SuSE and a couple of others, not all compatible
with RH, though.
If you package in rpm format, you will cover a lot of ground.
deb - Used by Debian
Debian is the distro supported by FSF, they also have a preview of FSF's
own kernel, the Hurd.
If you want to be state-of-the-art, you should cover this one, too.
I think I forgot one, didn't I?
Atle
------------------------------
From: Roberto Selbach Teixeira <[EMAIL PROTECTED]>
Crossposted-To:
24hoursupport.helpdesk,alt.comp.shareware.programmer,comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: 11 Apr 2001 11:54:42 -0300
On Wed, 11 Apr 2001, [EMAIL PROTECTED] wrote:
> On 11 Apr 2001 09:04:05 -0300, Roberto Selbach Teixeira
> <[EMAIL PROTECTED]> wrote:
>
>>> It _is_ hard to configure, unless you happen to be so insane as to
>>> like the emacs defaults. I don't. I don't dismiss emacs as being
>>> useless, but the emacs defaults are so far off from anything I
>>> would consider useful that it just takes too much work to get it
>>> to work _with_ me, instead of _against_ me. Emacs out of the box
>>> is just as annoying to me as the Microsoft Office paper clip. It
>>> just tries to do too much. The difference is that the Office
>>> assistant is intelligent enough to understand when it's not
>>> wanted, while emacs isn't.
>
>>Maybe you just don't know "Customize". Try using it to configure
>>Emacs and you will see how "difficult" it is. Customize offers a
>>interface for customization that don't require a single line of code
>>or to edit a file. The user doesn't even have to know in which file
>>the customization goes.
>
> Don't patronize me. Of course I know about customize. First of all
> it sucks, and second -- it's not enough. You need more modification
> than just fiddling around in customize to make emacs useable.
What can't you do with customize?
>>As for Emacs defaults, I agree with you that they are not the best
>>for everyone. But all you have to do is using the menu
>>Options->Customize Emacs to change the whole thing.
>
> Not "the whole thing". Absolutely not.
No? Example?
>>> vim is _very_ easy to configure. You have good help files that are
>>> easy to maneuver, and the customization screens in emacs don't
>>> hold a candle to the ease of use and maneuverability of the
>>> corresponding screens in vim.
>
>>Vim requires the user to edit configuration files which use a very
>>obscure syntax. As for documentation, try Help->Read the Emacs
>>Manual to see a real good documentation.
>
> Have you tried :options? Apparently not.
>
It's just like editing the configuration file.
--
Roberto Selbach Teixeira [EMAIL PROTECTED]
Conectiva, S.A. http://www.conectiva.com
You may think that there is nothing you need to know about Vi.
Don't fool yourself, there is at least one thing you positively
*have* to know about Vi:
Pressing lots of ESC's followed by ":q!<Ret>" will quit the damn thing.
------------------------------
From: Craig Kelley <[EMAIL PROTECTED]>
Crossposted-To:
comp.editors,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.softwaretools,comp.os.linux.advocacy
Subject: Re: Need your recommendation for a full-featured text editor
Date: 11 Apr 2001 09:08:27 -0600
Roberto Selbach Teixeira <[EMAIL PROTECTED]> writes:
> On Tue, 10 Apr 2001, [EMAIL PROTECTED] wrote:
> > The vim variant supports syntax hiliting, but it's awkward to
> > configure, and transferring your configurations (especially custom
> > color pallettes) to other machines requires much more than just
> > copying .vimrc (unfortunately). I use the syntax hiliting on my
> > main linux development machine, but on all the other machines I just
> > use default settings. I know I can just set some environment
> > variables, but that hasn't worked consistently from machine to
> > machine.
> >
> > OTOH, when I do serious development, I telnet the files to my
> > Windows machine and use a real editor!!
> >
>
> Emacs for Windows?
No, silly, *X*Emacs for Windows:
http://www.xemacs.org/Download/win32/
(we want *colour* syntax highlighting)
In all seriousness, it's one of the first things I install when I must
use Windows as a programming platform. That, and perl, of course.
--
It won't be long before the CPU is a card in a slot on your ATX videoboard
Craig Kelley -- [EMAIL PROTECTED]
http://www.isu.edu/~kellcrai finger [EMAIL PROTECTED] for PGP block
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************