|
| chrisname (2526) | |||
Good point.
Oh, THAT's what you mean! Load enough bytes to fill a window; (80*24 for now; until I GUI) then when you scroll down; unload the first row and load the second row? | |||
Last edited on | |||
| helios (6057) | |
| That would be too slow if you're going to open and close the file for each read. Actually, forget what I said earlier. Loading 4K every time the cursor moves outside of the loaded section would be enough. x - cursor (or visible space) [_] - loaded data [0] - not loaded data [x___][0000] [_x__][0000] [__x_][0000] [___x][0000] [0000][x___] | |
| chrisname (2526) | |||
I think I understand. I should load the 4KiB of the file the cursor is "on". So you're actually looking for a command line program? That simplifies things. Funnily enough the max filename size is also 4KiB (4096 characters to be specific) according to stdio.h's FILENAME_MAX. I'm using my own version; same size, though. Oh and for now I'm only going to have one file open at a time; but in the future I might implement a doubly-linked list so you can have more; probably 16 maximum (because that would still require <= 64KiB just to store the list of filenames, let alone the <= 4KiB for each file buffer, the size of the pointer to the file structure (FILE*), etc...). Edit: like these: Cursor at (0,0): http://i49.tinypic.com/2wcl4lz.jpg Cursor at (0, 3): http://i46.tinypic.com/fax47k.jpg ? | |||
Last edited on | |||
| chrisname (2526) | |
Urgh! I can't get GTK installed. What should I use for the GUI??? Stupid GTK; I did everything I was meant to; setexport GTK_CFLAGS="`pkg-config gtk+-2.0 --cflags`"; export GTK_LIBS="`pkg-config gtk+-2.0 --libs`"... What more does it want?Ugh... I'll try some other library; I wanted to use GTK because it looks awesome (IMO) but whatever... | |
Last edited on | |
| helios (6057) | |
| Qt. Build it complete from source for extra fun (C:\Qt\: 10.1 GiB). | |
| chrisname (2526) | |||
| I tried Qt before. There is no way I'm installing Qt. It took over three hours from ./configure until make install was finished. I'll try WxWidgets... it's cross platform. Edit: GTK+ is working now: build.sh
Don't ask why I split it into so many variables .That's just how I like to do it. Haven't got a name yet; can you think of one? I was going to go for "0xVi" temporarily; albeit fairly bad. I've never been good at coming up with names... :l This is just irresistible: http://library.gnome.org/devel/gtk/unstable/ch02.html Oh and I've almost finished the GUI. I have to finish some stuff for the text box and then I can start on the real code :) | |||
Last edited on | |||
Pages: [1] [2]
This topic is archived - New replies not allowed.
