📄 readme
字号:
This is the source code archive for TWReader. It also includes a binaryfor 1.1.x snow romdisks.There are 3 makefiles:Makefile for the workstationagendamake for the standard Agenda development environment (not recently maintained)snowmake for the snow Agenda development environmentThe agenda makefiles make several versions of the program:reader Does Aportis doc, ppm and text files using its own fl_file_chooser routine (the standard agenda one doesn't fit the screen)fltkreader As above but doesn't use flpda or fleksmlreader Doesn't do ppm but otherwise like readervsmlreader Doesn't do ppm but does use the Agenda version of fl_file_chooserstdreader Does ppm and uses the agenda version of fl_file_chooserstdreader is the one I'd like to distribute but not until fl_file_chooserworks on the Agenda.The other makefile makes the equivalents to reader and fltkreader in the standard agenda makefile.Upgrading=========The .bkmks file produced prior to v1.0 uses a hashdb format file. v1.0 usesa btree format file to support organising multiple bookmarks per file. Theold .bkmks file should be deleted before starting up the new version. If youare using any of the 1.0 betas the .bkmks files is compatible and does notneed to be deleted but should be renamed to .twr-bkmks for versions 1.1 andlater.Whats New in 1.1================The major difference is that autogenning is now done in the background(thanks for the idea, Norman). This means that the progress bar nowappears less obtrusively down in the bottom right hand corner.The name of the bookmarks files has also changed. Rename your .bkmks file to .twr-bkmks for the new version to pick it up.I've also added a couple of extra formats. PalmDoc files seem to havea plethora of minor variants. I'm pretty confident that I can nowhandle type 1, very confident of type 2 (which is the only type in theearlier versions of TWReader) and now, thanks to the bug report fromBill Kendrick I am moderately confident of being able to handle type4. Type 4 has bookmarks embedded which I can handle but the onlyexample of a type 4 file which I have found, these didn't quite lineup - I'm not sure if its me or the file. If you find any files whichTWReader finds embedded bookmarks in, please send them to me(licensing permitting). Similarly for any other PalmDoc files whicharen't handled correctly - I'm definitely missing the type 3 format!Also thanks to Bill there is now an icon which you can use. Of courseit'll work with any version but this is the first time I've had it toinclude in the tar file.Whats New in 1.0 (final)========================There is a new option on the view menu to select between normal and tightline spacing. The tight spacing is equivalent to what was used in the past.The gui has been tweaked and the code has been tightened a little. The mainreader widget (myoutput) IS now a widget so could be included in other appsmuch more easily.I've replaced fl_width with fl_widthi - change it back if you need to compileagainst a version of FLTK which doesn't have fl_widthi. Using fl_widthi allowscompilation without the maths libraries - i.e. no floating point. Exceptthat flek etc require -lm under snow!As usual, I have fixed all known bugs and incorporated all requested featureswith the exception of stuff noted below and the ability to read gzipped files.Actually, thats a slight lie. I have implemented the ability to read gzippedfiles but it needs zlib which is installed in the compilation environment butwasn't in the romdisk which I have. If you want to try it, or you want to useit on the workstation, just replace Text.h by ZText.h and add -lz to the linkcommands in the makefiles. I'm not sure what the performance or memory usagewill be like on the Agenda - if you do get it working, let me know. Whats New in 1.0================Intro-----All requested features except for scrollbars (I didn't want to lose thescreen space) and landscape display (currently I have no idea where tostart on this - hints welcome) have now been included in TWReader.The most important bug fixes are handling of words longer than the screenwidth - these are now hyphenated and broken across lines, and muchimproved location/random access in PalmDoc format files. (Thanks toJens Wilhelm Wulf for finding these bugs). Random crashes due to incorrectstructure packing and calling fl_alert inappropriately have also beenfixed (thanks to Eugene Mayevski for setting me down the path to findingthese). Handling of resize events should also now be better should youpop-up/(whatever the opposite of pop-up is(?)) the keyboard or statusbar while using TWReader.Bookmarks---------Current position can be saved and restored using a user-defined name.The bookmark named CURRENT is reserved for storing the position in thefile current at program exit. If you have the suspend bug (like me)then periodically saving the current position to the CURRENT bookmarkwill help find the correct location in the file when you next reset theAgenda.Bookmarks are accessed via the Marks menu. The menu items are:Mark - Saves the current position in the bookmark list. You can choosewhat ever name you want for it but it defauls to CURRENT. This is thebookmark loaded at start-up.Goto - Pops up a list of bookmarks for the current file. Currently,CURRENT is filtered out but may be put back in if users prefer itthat way. Let me know your preference.Delete - Pops up the bookmark list and deletes the bookmark selectedby the user.Autogen - Attempts to guess where bookmarks should be added to thecurrent file and adds them. The algorithm is very simple - anyparagraphs which end in a letter and are less than 128 characters longare selected. Make sure you have the format filters (see below) set todisplay such paragraphs as you want them. Doing an autogen on aProject Gutenberg text without StripCR and without Repara results inalmost every line of text going in the bookmarks file. Hence, USETHIS WITH CARE! Note that if you have CRs in your file and don't haveStripCR set, nothing goes in.Clear - Deletes all the bookmarks for the current file.(Including CURRENT! Save it again if you want it)Tidy - Deletes all bookmarks which belong to non-existent files.Unless you want to keep bookmarks for files which you have takenoff the Agenda you should do this every so often to keep the.bkmks file down to size.Pageup/down on screen touch---------------------------Touching the top/bottom half of the screen results in a Page-up/down.I'm not sure if I want to keep this feature - I may provide a toggleto enable people to choose whether or not they want to use it.Format filters--------------Reformatting of input files is now possible using a filter mechanism.There are currently five filters:StripCR - removes carriage returns from the text. Useful for DOS andProject Gutenberg texts. If the other filters don't seem to be working,turn this on.Unindent - removes spaces from the first line of a paragraph. Can bevery useful before doing a bookmark Autogen if you don't want spacesin front of your bookmark names.Repara - Treats a single LF as a space and a double LF as an end ofparagraph mark.Indent - Adds an additional indent to the beginning of each paragraph.Selecting Indent+ from the menu adds two spaces to the indent,selecting Indent- removes two spaces.DblSpce - Adds an extra LF between each paragraph. This results in anempty line between each pair of paragraphs.Please feel free to suggest more.Saving/Restoring of Preferences-------------------------------The font, font size and whether or not it is bold is rememberedbetween each invocation of the program. So are the format filters.Info Screen-----------Whilst fixing the bug in location within a PalmDoc file I found that Icould get some extra info regarding file sizes etc. I knocked up arudimentary screen to tell you:Filename - Self explanatoryFilesize - Size of the compressed fileTextsize - Size of the file before compression (approximate in thecase of ppms compressed files)Ratio % - Compression ratio (approximate in the case of ppmscompressed files). (= 100 - (100*filesize)/textsize)Higher is better.Location - Number of characters in the file up to the last currentlydisplayed (i.e. how much you have read up to that point)% Read - What percentage of the whole file is represented by Location.TODO====Tidy up the source code. I have a tendency to do put theimplementation in the header files while developing to save swappingback and forth between .h and .c* files. This needs sorting out.Similarly, I haven't put much (any?) comments in yet, and what is inthere could be out of date. One day I may get around to correctingthis 8-)Sort out how to distribute binary versions. There are so many versionsof romdisk out there, each of which is incompatible with differentversions of the compilation environment that it doesn't really makesense to provide any one. If you can't compile it yourself then let meknow which romdisk you've got and I'll try and provide a version foryou.Your suggestions. If it doesn't do what you want - let me know andI'll see what I can do. There are only two things which have beenrequested which haven't gone in yet, scrollbars because I don'twant to lose the screen space (if you want them, let me know andI may reconsider) and rotating the display (because I don't knowhow - yet. If you know how and want this feature, let me know).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -