Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#78218 - 07/03/2002 00:19 New userland app: Viewer
jheathco
enthusiast

Registered: 21/12/2001
Posts: 326
Loc: Mission Viejo, California
Alright, this is the only time I'm gonna release this personally, but feel free to make any changes to the source that I'm posting as well.. I just don't have any time to do any more work on it... anyways...

Viewer - this userland app allows you to display the contents of files in a specific directory. I made this for things like directions, etc. If you get directions from mapquest, you can save them to a file, upload it via ftp (with hijack), and then view them while your driving. Scrolling is done with the volume buttons on the remote or with the rotary knob.

Anyways, more info and directions for installation are at the top of the sourcefile at http://www.heathcosoft.com/empeg/viewer.c. The binary is at http://www.heathcosoft.com/empeg/viewer.

I'm using Bitt Faulk's preinit.d binary to start it up, and my init script that you can use to start up the viewer at boot is at http://www.heathcosoft.com/empeg/viewerinit.

_________________________
John Heathco - 30gig MKIIa w/ tuner module

Top
#78219 - 07/03/2002 03:14 Re: New userland app: Viewer [Re: jheathco]
justinlarsen
old hand

Registered: 31/12/2001
Posts: 1109
Loc: Petaluma, CA
can i bind it to the hijack menu?
_________________________
---- Justin Larsen

Top
#78220 - 07/03/2002 04:32 Re: New userland app: Viewer [Re: justinlarsen]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
According to the top of the .c file it already binds to Hijack menus as "Viewer"
(haven't had time to play with it yet)

/Michael
_________________________
/Michael

Top
#78221 - 07/03/2002 07:39 Re: New userland app: Viewer [Re: jheathco]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
This looks cool. Does it work on the /proc files? Tried it?

Cheers

Top
#78222 - 07/03/2002 07:54 Re: New userland app: Viewer [Re: jheathco]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
This looks really cool. And it's a great example of how to use the Hijack ioctls in userapps, which for us newbie C hackers is going to be very useful.

I'm going to have to install this one
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#78223 - 07/03/2002 10:38 Re: New userland app: Viewer [Re: jheathco]
peterk
journeyman

Registered: 28/11/2001
Posts: 87
Loc: California (Ex NZ)
Nice app John.
I'm going to have fun with this one

PeterK

Top
#78224 - 07/03/2002 12:08 Re: New userland app: Viewer [Re: peterk]
jheathco
enthusiast

Registered: 21/12/2001
Posts: 326
Loc: Mission Viejo, California
Right now it doesn't read from the /proc files but that seems like it could be relatively easy to do. I would have to modify a bit though. Right now, it reads up to 10k from a maximum of 10 files in /empeg/bin/viewer/data, so if you had 10 big files, it would eat 100k of memory (I don't think that's a lot, or are we really that hogged)?

Also, before I had it so when you scroll, it goes to the next visible line, but I was having a bit of trouble with that as I had to calculate the width of the following characters to see how many can fit on a line since kfont in hijack is variable width. It ended up being 1 or 2 characters off, so I just have it go to the next newline character, which seemed better afterwards anyway.
_________________________
John Heathco - 30gig MKIIa w/ tuner module

Top
#78225 - 07/03/2002 12:27 Re: New userland app: Viewer [Re: jheathco]
jheathco
enthusiast

Registered: 21/12/2001
Posts: 326
Loc: Mission Viejo, California
What I think would be really neat would be to make a directory browser, in which you can use the buttons to go into directories and out of directories, and choosing a file will display that file.
_________________________
John Heathco - 30gig MKIIa w/ tuner module

Top