OFE is a tool for looking at and modifying some of the files the Opera web browser puts on your disk. This is a 16-bit Windows program intended for use under Windows 3.1, Windows 9x, or Windows NT, and to support file formats of Opera 2.12 through 3.6x. The five currently available functions are:
1. Open Cache... lists all the opr?????.* files which Opera has put in the cache, along with selected information from Opera's index file (dcache.url). The display allows sorting in various orders, saving files with a name approximating the original file name, and deletion of unwanted files.
2. Open Cookies... shows the contents of cookies.dat in an understandable format, can sort in various orders, allows deletion of selected cookies, and allows pasting in cookies copied from another cookies file. It can also read a Netscape or similar cookies.txt file.
3. Open Global History... shows the contents of global.dat, sorts in various orders, and allows deletion of selected items. You can also paste information copied from the cache index, another Global History file, or a Visited Links file.
4. Open Visited Links... shows the contents of vlink.dat (or opera.lnk for Opera 2.12 users), sorts in various orders, and allows deletion of selected items. You can also paste information copied from the cache index, a Global History file, or another Visited Links file.
5. Opera Misc. Prefs... produces a dialog page allowing changes to some of the documented opera.ini settings not available from Opera's Preferences dialogs.
The first four functions are implemented as document windows in a Multiple Document Interface. That allows more than one of each document type to be used simultaneously to facilitate comparisons or Copy and Paste. The program currently limits the number of document windows to 15.
OFE is freeware. If you decide to use the program, the following applies:
This software is offered for use as is, and no warranty is stated or implied. The author is not responsible for any loss of data, damage to hardware nor any resulting loss of time or revenue resulting from the use of this program. Like all software, this program is utilized entirely at the user's risk.
Files in zip:
OFE.EXE The main program OFETZ32.EXE For 32-bit users only, transfers Time Zone information to OFE.INI OFEQWK.TXT Quick reference to nonstandard functions, used as help OFE.TXT This file in plain text form OFEHIST.TXT Change history
There's no installation routine. Just put the files in any directory (folder) you choose. OFE.INI will be created in the same directory. Create one or more icons / shortcuts if you want.
OFE.EXE is a 16-bit Windows program, so it can't use the 32-bit time functions which a 32-bit version of Opera uses. OFETZ32.EXE is a minimal 32-bit program which puts information in OFE.INI which OFE can then use to give accurate displays of date and time information saved by Opera. Users of 32-bit Opera versions should run OFETZ32 once to set the information. It will create OFE.INI if run before OFE, or update it later. OFETZ32 should be run again if any change is made to the time zone settings by the Control Panel Date/Time applet.
If you prefer a different directory for the ini file, or want alternative settings, both OFE and OFETZ32 accept an ini filename (.ini extension required, case insensitive) on the command line. If that filename includes a path it will be used as is. If it has no path, the program directory will be used. (Note: If an invalid path is specified OFE will just use it's default settings without saving at exit, OFETZ32 will indicate it couldn't write to the file.)
Uninstallation is easy; OFE makes no system changes. Just delete the files and any icons / shortcuts.
 First Window Maximized - controls whether the first document window opened will be maximized or not. The setting is saved in OFE.INI.
 Disable File Safety - enables the 'Delete File(s)' cache menu item which is grayed if Opera is running or the dcache.url file has been changed since you opened the cache. (Note: the menu item is also grayed if no files are selected.) This setting is intentionally NOT saved in OFE.INI, so file safety will always be active at the beginning of an OFE session.
Date Format and Time Format - self-explanatory. OFE will use Windows' date and time separator characters between the fields. Settings are saved in OFE.INI.
 Save at Exit
 Load at Start
These two checkboxes provide a means for OFE to automatically open document windows at startup. Save at Exit controls whether OFE will update a file list in OFE.INI when you close OFE. Load at Start controls whether the list will be used when you start OFE.(Duh!) With both checked, each session will start with the same set of files open as at the end of the previous session. Or after you've established a list you want loaded at each start you can uncheck the Save at Exit box to keep the fixed list. The only way to clear the list from within OFE is to close all windows and exit OFE with the Save at Exit enabled.
 Autosave Edited File
 No Save As dialog
These boxes are for a Cookies, Global History, or Visited Links document window in which you've deleted or pasted some lines. When only 'Autosave Edited File' is checked, closing the window brings up the Save As dialog. The OK button will save the file (with no overwrite warning unlike the File | Save As..), the Cancel button will discard the changes. If 'No Save As dialog' is also checked, the Save routine is used instead (the file is immediately saved with its original filename). (Exception: a Netscape cookies.txt file will always have the Save As dialog, since OFE doesn't save in Netscape format.) Note that any action which closes the window (for example exiting from OFE) triggers the autosave action.
The Font... button brings up the standard Windows font selection dialog. Any font change you OK takes effect immediately. Settings are saved in OFE.INI.
Closing the Options dialog with the Cancel button discards any changes except a font change. The OK button of course keeps the changes.
These windows have lines of information spaced into columns. At the top of each column is a button bearing the column label. Clicking that button (or moving the focus to it with the Tab or SHIFT+Tab key and pressing the Spacebar or Enter) does an ascending sort based on the contents of that column. Clicking the same column again gives a descending sort. The sort routine is "stable". That means for example if you sort the Cache display first by file size and then by MIME type, all the image/gif files will be presented in file size order, then all the image/jpeg files in size order, etc.
To adjust Column widths with the mouse, position the cursor near the right end of the column's sort button. A special cursor will indicate that you can click and drag. You can reduce a column to zero width or expand it to larger than your screen width. To expand a column which has been reduced to zero width you approach from the right to get a cursor with two vertical lines then click and drag.
To adjust Column widths with the keyboard, use Tab or SHIFT+Tab to move the focus rectangle to the column's sort button. Then the + and - keys will adjust the column width by one character, or the < and > keys will adjust by one pixel. The focus rectangle will be invisible for a very narrow column.
You can select one or more lines using conventional mouse or keyboard actions. Selected lines can be copied to the clipboard using CTRL+C or the edit menu. The clipboard gets:
1. formatted text which includes column labels and extra spaces added for column alignment. Pasting into a text editor set to a fixed-pitch font will give a columnar display, or pasting into a spreadsheet program will allow dividing the columns using the fixed-width option. There's also a 'Save As Text' menu item which uses the same formatting, but saves all lines to a file of your choice.
2. Custom formatted data for paste operations.
The Paste operations might better be described as a merge. When a pasted line matches an existing line (URL comparison for Global History or Visited Links, Site plus Cookie Name for Cookies), then the older of the two lines is eliminated.
Selected lines can also be deleted. For the Cookies, Global History, and Visited Links windows, this is a simple matter of deleting the lines from OFE's internal copy of the file, and doesn't affect the disk file unless you later do a 'Save' operation. For the Cache window, lines represent disk files in the cache directory and a delete operation permanently removes those files. To remind you of the difference, the Cache delete function is on the File menu and requires a SHIFT+Delete, while the delete function for the other windows is on the Edit menu and the key equivalent is just Delete.
The deletion routine can be somewhat slow. I wrote the core routine for an unsorted list, to keep it small and easy to debug. If you've sorted the list the deletion first unsorts it, then performs the deletion, then resorts it to the order you'd chosen. If you're planning to change the sort order anyhow, it may save some time to manually unsort before the delete. In any case, it's more efficient to delete many items at once than to delete few items many times.
If you need to copy just a portion of a line, or want to see all of a long line without horizontal scrolling, a right-click on the line will create a popup window with the line displayed in wrapped format.
When you choose one of the 'Open' commands (or the 'Opera Misc. Prefs...' command) from the File menu, an Open File dialog is displayed. The first time you do this, the path will be set to OFE's home directory, so you'll need to navigate to the appropriate file location. After that, OFE remembers the location of the last file of each type you tried to open.
When you choose 'Open Cache...' your target is the index file, dcache.url. OFE checks that file and merges its contents with a complete list of all the files in the same directory beginning with 'opr'. (If there aren't any files in cache, OFE just tells you so rather than opening an empty document window.)
The document window has 8 columns, most of which are obvious, but the 'Type' column needs some explanation. It shows a 3 character extension code either in lower case or upper case. The upper case ones are files which OFE has matched with a simple type determination routine. The lower case ones are either 'gif' files which OFE doesn't check (because that extension is almost always correct, and to save time) or other extensions which the type determination can neither confirm nor contradict.
For files which are not indexed in dcache.url, OFE leaves the MIME and Visited columns blank, puts a " ?:" in the 'Protocol' column, and a " ?" in the 'Site' column. Usually, you can consider such files prime candidates for deletion, since Opera has forgotten them. The exception is that if Opera is running, such files may have been added during it's current session and the index update not yet written to disk.
Double-clicking a line attempts to open the cached file using the ShellExecute function. That finds the program which is set to do the 'open' action for files with the cached file's extension and passes it the filename. I've disabled this call for files with the .exe extension, and it will also silently fail for any extension which isn't associated to an application.
The File menu has a 'Copy As.. ' item enabled when you have one or more files selected. This brings up a file save dialog sequentially for each selected file. The dialog shows the cache filename in its Titlebar, and has OFE's guess at the original filename preset as the destination name. OFE doesn't try to avoid duplicate filenames, but the save dialog will give a warning if the save would overwrite an existing file. If you ever get into this sequence accidentally with a large number of files selected, press and hold the ESC key; it cancels the save dialogs and the key autorepeat will finish the sequence in a reasonable time.
For 'Open Cookies...' your target is cookies.dat. OFE reads the file and expands to an internal form which allows deleting records without affecting subsequent records. If you then save the file it is compacted back to the form Opera expects.
You may also target a Netscape cookies.txt file. OFE will read and convert it to the same internal form. You can then save in Opera's form, or copy and paste to merge the cookies with an Opera cookies file. OFE doesn't save in Netscape format; I'll leave that to someone writing software to support Netscape users. I've only tested with Netscape Navigator 3.01 cookies and a cookies.txt exported to Netscape format by IE 5.
The display is only four columns, since I've combined the Domain and Path elements under the label 'Site', and also the Name and Value elements under the label 'Cookie'. For cookies which will only be sent over a secure connection, a (Secure) prefix is added to the Site column. Thanks to Yngve Pettersen of Opera Software for detailed information on cookies.dat, which also confirmed my guess about the Date/Time labelled 'Used'.
Copy and Paste between cookies files seems to work well. OFE does enforce limits of 300 total cookies and 20 per site, though, so you may need to delete some existing cookies before pasting new ones.
There's only one unusual Copy and Paste case noted so far. The format for storing an IP address like 220.127.116.11 changed between Opera 3.21 and Opera 3.5x. The earlier version broke that up into four strings stored in reverse order as is done with other domain elements. 3.5x and 3.6 store it as a single string. There's no harm done, since 3.21 just ignores the 3.5+ version and 3.5+ just deletes the 3.21 version.
The specifications for cookies as generally used on the web can be found at http://www.netscape.com/newsref/std/cookie_spec.html.
RFC 2965 is the latest specification for cookies. The versions of Opera with which OFE works have cookie handling based on drafts which preceded the RFC. http://www.ietf.org/rfc/rfc2965.txt is the text version, HTML versions are available from several sources.
Opera reads the cookies.dat file at most once per session when Opera first makes an actual http connection, and rewrites the file when you exit (but only if there's been a change). If you save an edited version between those two events, it'll probably be overwritten by Opera.
For 'Open Global History...' the target is global.dat. This is only for Opera 3.x users, since 2.12 didn't produce this file type.
When you paste lines into a global history list which were copied from a Cache index or Visited Links list, the URL is used for both the Title and Protocol/Site fields. It's trimmed to no more than 70 characters for the Title.
Saving the Global History sorts the list in Date/Time order, either ascending or descending depending on the file's original order. That original order is always ascending for Opera 3.5+, but Opera 3.21 alternates between ascending and descending. If you've added enough lines to make the list longer than the maximum set in Opera's preferences, Opera 3.5 or 3.6 will delete the oldest lines. Unfortunately, Opera 3.21 may delete the newest lines, and new lines added during that Opera session may also overwrite lines at the newest end. I advise 3.21 users to delete lines if needed to make the list somewhat shorter than the Opera limit. Once 3.21 has saved the list, it is again in the opposite order.
Opera 3.21 also has a problem with a Global History line with an empty or blank Title. That will cause it to truncate the history. I don't think 3.21 will create such a line, but if you wanted to use a history from another Opera version with 3.21, it would be worth checking. The best thing to do is just delete such lines, or open the file with any text editor and type in a title.
Opera reads the global.dat file at startup, and rewrites the file when you exit. If you save an edited version between those two events, it'll be overwritten by Opera.
Opera 2.12 users open opera.lnk, Opera 3.x users open vlink.dat. The file format differs only in the second ID byte. If you save the file with a .lnk extension, the 2.12 ID will be written, and if you save with a .dat extension the 3.x ID will be written. Any other extension just preserves the ID from the original file.
Opera uses both the Visited Links file and the cache index for deciding when to show a link as visited. The Visited Link file gets an immediate entry when you load a local file (since local files don't get cached), but not when you load a remote file. If Opera later removes the remote file from cache to make room for something newer (or when doing an 'Empty Now' or 'Empty on Exit' function), and the file's visited time is still within the limit you've chosen for displaying links as visited, then an entry is added to the Visited Links file.
When deleting cache files using OFE, you can first copy the lines and paste into the Visited Links file to preserve the marking as visited. Your next Opera session will delete any lines with a visited time older than your chosen limit.
Opera reads the opera.lnk or vlink.dat file at startup, and rewrites the file when you exit. If you save an edited version between those two events, it'll be overwritten by Opera.
The target here is your opera.ini file. Once located, you'll get a dialog box with 3 groups of checkboxes. Each checkbox corresponds to a possible entry in that ini file. In most cases, if the entry is there with a value of 0, the checkbox will be empty. Otherwise, the box will show a check mark, since not having the entry gives the same results as having it with a value of 1. The one exception is the 'F2 Auto Dropdown', where not having the entry is equivalent to having the entry with a value of 0. OFE does keep track of which entries are actually there so it won't add an unnecessary entry.
To make a change, just click a checkbox or tab to it and press the spacebar. Then exit the dialog by clicking OK or pressing the Enter key.
Here's a table showing the exact entry names and the corresponding checkboxes.
Section: Entry Key in opera.ini: Checkbox Label: ------------ --------------------------- ----------------------- [PRINTING] SHOW PRINTER HEADER Print Header and Footer [USER PREFS] SHOW SPLASH SCREEN Show Splash Screen SHOW PROBLEM DIALOG Show Problem Dialog SHOW EXIT DIALOG Show Exit Dialog EnableComboAutoComplete Combo Auto Complete DirectURLDialogAutoDropdown F2 Auto Dropdown SAVE WINDOWS Save Windows at exit [TOOLBAR] SHOW NEW BUTTON NEW SHOW OPEN BUTTON OPEN SHOW SAVE BUTTON SAVE SHOW PRINT BUTTON PRINT SHOW COPY BUTTON COPY SHOW SEARCH BUTTON SEARCH SHOW PREV BUTTON PREVIOUS SHOW RELOAD BUTTON RELOAD SHOW NEXT BUTTON NEXT SHOW HOME BUTTON HOME SHOW OPEN URL BUTTON OPEN URL SHOW HOT LIST BUTTON HOT LIST SHOW TILE BUTTON TILE SHOW CASCADE BUTTON CASCADE
Applicability: The control for printing Header and Footer has no effect on Opera 2.12, which just doesn't add them ever. The Combo Auto Complete and F2 Auto Dropdown are for Opera 3.6 only. All others work in Opera 2.12, 3.21, 3.51, and 3.6.
'Save Windows at exit' is normally controlled by the check box on Opera's Exit Dialog, but if you disable that dialog either with OFE or by unchecking the Opera 3.6 'Confirm exit' checkbox...
The Opera documentation on the ini file entries to enable/disable Toolbar buttons says you must use the 'Full' Button bar type selection on the Preferences | Button- and Statusbar dialog. That's not strictly true. For instance, if you uncheck the 'OPEN URL' button, it will disappear on both the 'Full' and 'Simple' button bar types. But it is true that these settings will not ADD buttons to the 'No Buttons' or 'Simple' types.
Opera reads an ini file at startup, and writes it whenever you change preferences in Opera and at exit. Any change you make to that ini file while Opera is running is useless.
These are simple windows, basically designed to show some text wrapped to fit within the window width. They can be resized or moved, and vertical scrolling is available when needed.
You can also select some of the text and copy it to the clipboard. Rather than waste screen space for a menu bar or a copy button, I've just added 'Copy Text' to the System Menu (a.k.a. Control Menu) accessible by clicking the icon at the left end of the Titlebar (or ALT+Spacebar). The standard CTRL+C key combination does the copy without using the menu, of course.
A popup window can be created showing the full contents of a line from any of the document windows by right-clicking the line or simulating a right-click with the R key. A popup window is also used to display the Quick Reference text file which serves as OFE's help.
These windows are always visible when OFE is. They will be hidden if you minimize OFE, and destroyed if you exit OFE or if you close the document window from which they were created.
Mouse users can switch to another window simply by clicking it. Keyboard users can switch using the 1 or 2 keys, which cycle through all windows.
A popup window can be closed by double-clicking the icon at the left end of its Titlebar, choosing the Close option on its System Menu, or by pressing the ESC key. The standard ALT+F4 also works, but if you hold that down a little too long, OFE will be closed.
I've limited the number of popups to 2 per document window, and 5 copies of the Quick Reference. Combine that with 15 possible document windows and you can thoroughly clutter your screen. But the limits are simply what I consider sufficient and made programming the 1 and 2 key sequencing easy. If any user needs more, I'll increase the limits in a future version.
There are three different menu versions; one when there are no documents open, another when a Cache window is the active window, and finally one for when the active window is a Cookies, Global History, or Visited Links window. The following listing has all the items which appear on any menu version.
File Menu: --------------------------------------------------------------- Save Saves Cookies, Global History, or Visited Links in Opera's format to the original filename (no 'Save as' dialog). Save As... Saves Cookies, Global History, or Visited Links in Opera's format with 'Save as' dialog to permit renaming. Save as Text... Saves the listing for Cookies, Global History, or Visited links to a file as formatted text. Delete File(s) Deletes selected files from the Cache directory. Copy As... Copies selected files from the Cache directory, with renaming for each. Open Cache... Creates a Cache document window (with file open dialog). Open Cookies... Creates a Cookies document window (with file open dialog). Open Global History... Creates a Global History document window (with file open dialog). Open Visited Links... Creates a Visited Links document window (with file open dialog). Close Closes the active document window. Opera Misc. Prefs... Creates an Opera Miscellaneous Preferences dialog (with file open dialog). OFE Options... Creates an OFE Options dialog. MRU Cache Creates a Cache document window using the saved filename from the previous Open. MRU Cookies Creates a Cookies document window using the saved filename from the previous Open. MRU Global History Creates a Global History document window using the saved filename from the previous Open. MRU Visited Links Creates a Visited Links document window using the saved filename from the previous Open. MRU Op. Misc. Prefs Creates an Opera Miscellaneous Preferences dialog using the saved filename from the previous Open. Exit OFE Quits the program. Edit Menu: --------------------------------------------------------------- Copy text Copies selected lines to the clipboard as formatted text. Paste Merges custom data from the clipboard. Delete Deletes selected lines for Cookies, Global History, or Visited Links. Select All Selects all lines in active document listing. Deselect Deselects all lines in active listing. Save as Text... Saves all lines of a Cache directory listing to a file as formatted text. Unsort Restores the original order of a listing. Window Menu: ------------------------------------------------------------- Cascade Standard diagonal overlapped arrangement of document windows. Tile Horizontal Non-overlapped biased toward short and wide. Tile Vertical Non-overlapped biased toward tall and narrow. Arrange Icons Move all minimized windows to bottom. Autotile Horizontal Checkable item. See Note. Autotile Vertical Checkable item. See Note. Close All Close all document windows. Note: If you have one of the Autotile items checked, it will force a tiling of the selected flavor in the following cases: 1. When you minimize a window. 2. When you switch a window from maximized to restored. 3. When you switch a window from minimized to restored. ** the following apply only if the document window is not maximized ** 4. When you open a new document. 5. When you close a document. 6. When you change the size of OFE's main window. Help Menu: --------------------------------------------------------------- Quick Ref... Creates a popup window containing OFEQWK.TXT. About OFE... Creates a dialog with basic program information. Popup window System Menu addition: --------------------------------------- Copy Text Copies selected text to clipboard.
(1) Document Windows Maximize / Restore F7(toggle) Note: also for Quick Reference popup. Lengthy operations which show the Busy cursor (hourglass) can be stopped by pressing a key. The keystroke will also perform its normal function, though, so if you just want to stop an operation use a key which doesn't start something. The CTRL or SHIFT keys are suitable, as is ESC. Column Operations: Sort- Click column sort button, or move focus rectangle there and press Spacebar or Enter. Focus to sort- Tab (forward) or SHIFT+Tab (reverse). Adjust width- Mouse: drag right side of sort button. Keyboard: move focus to sort button, then adjust using + and - to change by one character width, or > and < to change by one pixel. Focus to list- additional Tab or SHIFT+Tab's, or any vertical scroll operation. Scrolling document & focus rectangle: Down one line- Down arrow or click bottom scrollbar arrow (moves focus only, if possible). Down one line- CTRL+Down arrow or CTRL+click bottom scrollbar arrow (moves text only, if possible). Up one line- Up arrow or click top scrollbar arrow (moves focus only, if possible). Up one line- CTRL+Up arrow or CTRL+click top scrollbar arrow (moves text only, if possible). Down one page- Page Down or click scrollbar below thumb. Up one page- Page Up or click scrollbar above thumb. End of document- CTRL+End. Top of document- CTRL+Home. Variable- Drag scrollbar thumb. (either scrollbar) Right one char- Right arrow or click right scrollbar arrow (char is the average character width of the font in use). Left one char- Left arrow or click left scrollbar arrow. Right 7/8 window- CTRL+Right arrow or click scrollbar right of thumb. Left 7/8 window- CTRL+Left arrow or click scrollbar left of thumb. Full right- End. Full left- Home. Selection of lines in document: Single- Click line or press Spacebar with focus on line. This clears any previous selection. Single (toggle)- CTRL+click or CTRL+Spacebar changes selection state, does not affect any other selection. Range1- Click or Spacebar one end of range, SHIFT+click or SHIFT+Spacebar other end. Range2- Click and drag from one end of range to other. Range3- SHIFT+Up (or Down) arrow. This is implemented as a toggle function so it can also be used to deselect. Select All- CTRL+A. Deselect All- CTRL+D. Open Cached file Double-click. Note: In all actions the Enter key functions the same as the Spacebar. The mouse range selections can be combined. If you start a drag with the CTRL or SHIFT key down previous selections won't be cleared, etc. Pressing CTRL during any portion of a drag will do toggles rather than sets. (2) Popup Windows Mouse operations: Position caret- Click between two characters.(clears any selection) ** Scrolling with the mouse leaves the caret at its original position in the text ** Down one line- Click bottom scrollbar arrow. Up one line- Click top scrollbar arrow. Down one page- Click below scrollbar thumb. Up one page- Click above scrollbar thumb. Select1- Position caret before first character, SHIFT+click after the last character (or vice versa). Select2- Click and drag. Copy to clipboard- Click icon at left of Titlebar to get menu, click 'Copy Text' item. Close window- Double-click icon at left of Titlebar. (Win 9x also could click X at right of Titlebar) Keyboard operations: ** all motion operations move the caret within the text Right one- Right arrow. Left one- Left arrow. Down one line- Down arrow. Up one line- Up arrow. End of line- End. Start of line- Home. Down one page- Page Down. Up one page- Page Up. End of text- CTRL+End. Start of text- CTRL+Home. Select- SHIFT+arrow key. Open menu- ALT+Spacebar. Copy to clipboard- CTRL+C. Close window- ESC. (3) Miscellaneous key functions Previous Window- 1 or CTRL+1 Next Window- 2 or CTRL+2 Note: CTRL+Tab or CTRL+F6 are the Windows standard keys for Next MDI document window, and CTRL+SHIFT+Tab or CTRL+SHIFT+F6 for Previous MDI document window. They work, but won't switch to or from the popup windows. CTRL+F4 is the Windows standard to close a document Window. I saw no reason to change that. ALT+F4 is the Windows standard to close a popup Window. It works, but if held down long enough for autorepeat to start it will also close OFE. So I added the ESC key to close popups, for those who prefer safety to standards. (4) Menu accelerator keys Save Ctrl+S Save As F11 Save As Text F12 Delete File(s) Shift+Del Copy Text Ctrl+C Paste Ctrl+V Delete Del Select All Ctrl+A Deselect Ctrl+D Unsort Ctrl+U Cascade Shift+F5 Tile Horizontal F6 Tile Vertical Shift+F6 Quick Ref F1
(1) File Parse Error
When you try to open a file, this error appears if OFE can't handle it. Possible causes include trying to open a file of the wrong type, a corrupted file, or something I didn't find while designing and testing so there's no code to handle it. If you're reasonably certain the file is good, I'd like a copy of it to check.
In most cases, this error will also indicate the hex offset in the file where OFE gave up, in the form ' @ 0xNNN' where NNN is the hex offset.
(2) Out of Memory
If OFE asks the system for a block of memory and is told there's none available, it issues this error and quits what it was trying to do. When this error occurs during the initial stages of creating a window, it will be followed by a Can't create window for <File> error.
(3) Can't open <File>
The file system won't allow OFE to open the file. Either the file doesn't exist or another application has it open in a mode not allowing OFE's read access.
(4) No cached files in <Path>
'Open Cache...' didn't find any files to list. Rather than giving you an absolutely useless empty display OFE just displays this message.
(5) No Cookies in <File>
'Open Cookies...' didn't find any cookies to list.
(6) No lines in <File>
The file you chose for 'Open Global History...' or 'Open Visited Links...' is too short to contain even one line for display.
(7) <File> is not an Opera ini file.
'Opera Misc. Prefs...' didn't find a [USER PREFS] section containing an entry for 'OPERA DIRECTORY' in the file you chose.
(8) Can't create window for <File>
Either the system has refused to create a window, or there's not enough memory and the window is closing before it becomes visible. In the latter case, this message is preceded by an Out of Memory message.
(9) Error writing <File>
Indicates problems such as trying to write to a read-only file, out of disc space, etc.
My general approach is to do error prevention rather than error detection. I'm sure users will tell me where I haven't succeeded.
(1) <File> has been modified.
When you reactivate a document window after using another application or another OFE window, the file's Date/Time is checked. If it has changed, this message is displayed.
(2) <File> has been deleted.
If the file is no longer there in the reactivation checking, this message is displayed. It can also be displayed in the unlikely case that the file was deleted by another application immediately after OFE finished reading it, when OFE first reads the file's Date/Time.
(3) Delete Aborted
If a Delete operation is stopped by pressing a key during it's initial 'unsort' phase, this message is displayed and nothing is deleted.
(4) Memory limited. No unindexed files in list.
For 'Open Cache...', in the unlikely event there's enough memory to process the cache index (dcache.url) but not enough to also get the directory of opr?????.* files, OFE displays this message.
(1) Opera File Formats --
These are my decodings of the file contents. There may be significant items I've missed, particularly for some fields in the cache index.
MWORD means a 16 bit value stored most significant byte first.
MTIME means a 32 bit time value stored most significant byte first.(seconds after 1 Jan. 1970 00:00:00)
MSIZE means a 32 bit file size value stored most significant byte first.
a. Cache Index file (dcache.url)
BYTE 0xF5 (0xF4 in Opera 2.12 version)
*MWORD URL length
MWORD length of secondary URL, usually 0
ASCII secondary URL if present (redirect?)
*MWORD FileName length
*ASCII FileName (2.12 has full Path\Name, 3.x Name only)
MWORD length of ASCII Date/Time
*MWORD length of MIME Type, occasionally 0
*ASCII MIME Type
*MTIME File creation(?) Date/Time
*MTIME Visited/checked(?) Date/Time
MTIME File expires(?) Date/Time (usually 0)
BYTE usually 0, values up to 9 have been seen
MSIZE often 0, File Size when filled
*MSIZE File Size except occasionally 0
BYTE usually 2
BYTE various values, seem to follow MIME type
MWORD length of extra info, usually 0
ASCII extra info if present (examples seen have been scripting)
MWORD 0* = field used by OFE. The indicated File Size value is only used in the unlikely event there's enough memory to process the dcache.url but not enough to also get the directory of opr?????.* files.
MWORD length of naming sequence
ASCII 5 naming sequence characters (0-9,A-Z)
b. Cookies File (cookies.dat)
BYTE 0xE8 (also possibly 0xE9 per Yngve)
Domain subrecord:BYTE 0 (implied, not present in very first record)Path subrecord:
MWORD domain element length
ASCII domain elementBYTE 0x02Cookie subrecord:
MWORD path element length
ASCII path elementByte 0x01Transition: zero or more bytes of 0
MWORD Name length
MWORD Value length
MTIME Expiration Date/Time
BYTE 0 = normal, non-zero = send over secure connection only.
MTIME Used Date/Time (sometimes 0)
Domain (and Path) elements are in reverse order in the file, i.e. www.adpad.com has com, then adpad, then www. If the next record was for the domain www.altavista.com, the transition area would have 2 bytes of 0, indicating that www and adpad are discarded, but com kept. Then the altavista record would just have altavista and www domain elements.
Yngve Pettersen notes the format is a tree structure, which means I may eventually find some highly optimized code to replace some of what I've written. Currently, OFE's internal format just expands each cookie to contain all elements and increases the number of zeroes in the Transition to match. In essence, that's a row of saplings.
c. Global History file (global.dat)
ASCII Title, terminated with carriage return and line feed.
ASCII URL, terminated with carriage return and line feed.
ASCII decimal Date/Time, terminated with carriage return, line feed. (seconds after 1 Jan. 1970 00:00:00)
d. Visited Links (vlink.dat or opera.lnk)
BYTE 0xF5 for vlink.dat, 0xF4 for opera.lnk (2.12 version)
MWORD URL length
MTIME 'Visited' Date/Time
(2) Netscape Cookie File format --
This is again my own analysis of the format, and describes what OFE will currently accept. I'll try to handle a later variation if it can be accommodated without excessive code.
The file is plain text, and each line ends with two carriage returns and a line feed. It begins with a header (between the lines):
------------------------------------------------------ # Netscape HTTP Cookie File # http://www.netscape.com/newsref/std/cookie_spec.html # This is a generated file! Do not edit. ------------------------------------------------------
Cookies exported by IE to the Netscape format are similar, but end lines with two line feeds. The header is:
------------------------------------------------------ # Internet Explorer cookie file, exported for Netscape browsers. ------------------------------------------------------
OFE starts by skipping any number of empty lines or lines beginning with a '#' character. Lines may be terminated by one or more carriage returns or line feeds in any combination.
The cookies data is seven fields per line, each field separated from the next by a single space character or a single tab. OFE replaces all the spaces, tabs, carriage returns and line feeds with zeroes so the fields can be treated as null terminated strings. The seven fields are:
1. Host or domain. If this contains only numerical characters and dots, OFE stores it as a single string to match the Opera 3.5+ format for IP addresses. Otherwise it is broken into substrings by dots, and must have at least 2 substrings or OFE outputs a File Parse Error and quits trying to read the file.
2. Either "TRUE" or "FALSE", where TRUE means that field 1 was specified by the optional 'domain=' cookie attribute and FALSE means field 1 is the host which sent the cookie. Any other contents cause a File Parse Error.
3. Path. This field may be empty if there was no 'path=' attribute, but usually has a '/' character and on rare occasions has multiple path elements strung together. If so, OFE stores the path element substrings indicated by the slashes.
4. Either "TRUE" or "FALSE", where TRUE means the cookie is secure, FALSE not. OFE saves the status, or quits with a File Parse Error.
5. Expiration Date/Time, expressed as seconds after 1 Jan. 1970 00:00:00 GMT. OFE reduces this to a binary number, and adjusts it by the local standard time offset to match the way Opera does it.
6. Cookie Name. OFE just stores it unless it's empty or longer than 4096 bytes, either of which will cause OFE to issue a File Parse Error.
7. Cookie Value. OFE just stores it unless it's empty or longer than 4096 bytes, either of which will cause OFE to issue a File Parse Error.
After the seventh field OFE steps over any extra zero bytes, then expects field 1 unless it has reached the end of the file.
(3) OFE Custom Clipboard Formats --
This is the format used when copying from Visited Links, Cache index, or Global History.
DWORD 32 bit total length of clip (Intel format, LSB first) LONG 32 bit number of lines in clip (Intel format, LSB first) Each line has: MWORD 16 bit length of Title (MSB first) This is 0 if copying from Visited Links or Cache index ASCII Title (if any) MWORD 16 bit length of URL (MSB first) ASCII URL TIME 32 bit Date/Time, seconds since 1 Jan. 1970 00:00:00 (LSB first)
This is the format used when copying from Cookies.
DWORD 32 bit total length of clip (Intel format, LSB first) LONG 32 bit number of lines in clip (Intel format, LSB first)
Each line contains a cookie record in the same format as the Opera cookies.dat file records but with all elements specified.
Name: Josef W. Segur (Joe)
Residence: Northern New York State, USA (about 80 miles south of Montreal, Quebec, Canada)
Occupation: retired former electronic engineer and programmer