fam
[Top] [All Lists]

Re: [fam] NEdit (was Re: No /dev/imon)

To: opk@xxxxxxxxxxxxx
Subject: Re: [fam] NEdit (was Re: No /dev/imon)
From: "Rusty Ballinger" <rusty@xxxxxxxxxxxxxxxxxx>
Date: Thu, 18 May 2000 15:18:00 -0700
Cc: fam@xxxxxxxxxxx
In-reply-to: Oliver Kiddle <opk@xxxxxxxxxxxxx> "[fam] NEdit (was Re: No /dev/imon)" (May 18, 11:15am)
References: <391EE790.CEAA0019@xxxxxxxxxxxxx> <10005151836.ZM44854@xxxxxxxxxxxxxxxxxx> <3923C2C8.52B96094@xxxxxxxxxxxxx>
Reply-to: rusty@xxxxxxx
Sender: owner-fam@xxxxxxxxxxx
> This means that the polling will be done for every user keypress which
> is fairly regularly. It also seems that it doesn't just do a stat, it
> checks whether the file can be written to so I'm not sure how that
> could be done with fam.

When you get a Changed event from fam (which will also happen if the file's
mode changes, which is good), you'll basically call CheckForChangesToFile.
(Except that the bit which ignores the event if the last check was less
than MOD_CHECK_INTERVAL should probably be moved down to where the warning
is popped up--if the file is changed, and CheckForChangesToFile is called,
and a moment later the file's mode is changed to read-only, for example, you
probably still want to call UpdateWindowTitle and UpdateWindowReadOnly!)

Also, you'll get a Deleted event from fam if the file is deleted, which can
either be ignored (as CheckForChangesToFile does now by bailing when the
stat fails) or it might be nice to pop up a dialog saying so.

> Also, do you know if motif offers a way that the select approach could
> be used with fam?

I think XtAppAddInput?  I don't know anything about it, but it's used by
nedit/source/shell.c, which might provide a good example.

> I'd have thought that given time, there will be a good few programs
> using fam, especially with it being used in KDE's standard library so
> that the initial inetd start would become less relevant. Do many of the
> IRIX programs use fam?

Yes: mailbox, zmail/mediamail, mediad (removable media daemon), fm (file
manager), ov (desks overview), iconcatalog (shows installed software),
and other desktop & system administration stuff.

> Anyway, if you think it would be useful addition to NEdit, I'll have a
> go at adding it.

That would be neat.  You'll have to wrap it in #ifdef USE_FAM or something,
and add -DUSE_FAM to Makefile.sgi, and a comment in the Linux section of the
README saying "to use fam, add -DUSE_FAM to CFLAGS in
makefiles/Makefile.linux".  I'll be happy to test it on my machines!

--Rusty

--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>