home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
disk
/
misc
/
dcmp
/
history
< prev
next >
Wrap
Text File
|
1995-02-27
|
18KB
|
372 lines
/*--------------------------------------------------------------------------*
__
/ / $RCSfile dcmp.c,v $
____/ /______ _ _ ______ $Release 1.0$
/ __/ // ____// \_/ \ / __ / $Revision: 1.51 $
/ /_/ // /___ / /__/ // /_/ / $Date: 93/01/17 16:45:27 $
/_____//_____//_/ /_// ____/ $Author: tf $
/ / $State: Exp $
Revision 1.51 /_/
(c) Copyright 1992 Tobias Ferber, All Rights Reserved.
*--------------------------------------------------------------------------*/
RCS file: RCS/dcmp.c,v; Working file: dcmp.c
head: 1.51
branch:
locks:
access list:
symbolic names:
comment leader: " * "
total revisions: 51; selected revisions: 51
description:
compare two disks - block by block.
----------------------------
revision 1.51
date: 93/01/17 16:45:27; author: tf; state: Exp; lines added/del: 36/70
bug in refresh_device_list() removed
Kickstart V39 disk types implemented
----------------------------
revision 1.50
date: 93/01/16 22:40:52; author: tf; state: Exp; lines added/del: 16/4
*** empty log message ***
----------------------------
revision 1.49
date: 92/12/10 04:18:38; author: tf; state: Exp; lines added/del: 98/30
Our dcmp window is GZZ now. Some modifications had to be made
concerning the window size under Kickstart 2.0 (border size etc)
----------------------------
revision 1.48
date: 92/10/18 20:16:09; author: tf; state: Exp; lines added/del: 241/86
Pointer stuff implemented. NiceOpenWindow() and NiceCloseWindow()
are supported. Some further translation.
----------------------------
revision 1.47
date: 92/10/09 21:07:57; author: tf; state: Exp; lines added/del: 214/171
Code slightly modified to work under Kickstart 2.0. Mainly hide_path()
and show_path().
Some functions moved to intuisup.c
----------------------------
revision 1.46
date: 92/10/04 15:55:30; author: tf; state: Exp; lines added/del: 292/115
prework for french translation, german part okay.
----------------------------
revision 1.45
date: 92/09/30 09:47:57; author: tf; state: Exp; lines added/del: 173/62
Multilingual menus implemented.
----------------------------
revision 1.44
date: 92/09/24 21:05:54; author: tf; state: Exp; lines added/del: 139/68
Some minor optimizations.
----------------------------
revision 1.43
date: 92/09/13 20:15:21; author: tf; state: Exp; lines added/del: 272/143
Menus added and dcmp_Request() procedure implemented.
----------------------------
revision 1.42
date: 92/09/09 11:09:44; author: tf; state: Exp; lines added/del: 44/19
Some minor changes in the trackframe display during do_dcmp_stuff().
Deep read option available via keystroke now. (displayed in front of
the Attempts counter)
----------------------------
revision 1.41
date: 92/09/08 06:00:42; author: tf; state: Exp; lines added/del: 232/105
Deep read option (`-d') implemented. If this option is passed each
track will be read twice. That makes it possible to detect weak
data! Currently only weak tracks are listed. Maybe a list of weak
blocks will be created in future revisions.
----------------------------
revision 1.40
date: 92/09/06 16:19:20; author: tf; state: Exp; lines added/del: 128/115
!!! THIS IS THE FIRST VERSION READING TRACKS (NOT BLOCKS) !!!
do_dcmp_stuff() reads complete tracks now (instead of single blocks).
Each sector in this track will be compared. There was a bug in former
revisions. (only the first half of a block was compared!). Statistics
havn't changed. The list of differing blocks remained.
The cursor will fade now during CLI/Shell operations. The current track
will be displayed instead of the current block.
----------------------------
revision 1.39
date: 92/09/04 20:35:53; author: tf; state: Exp; lines added/del: 60/41
Error handling has improved. There are many different error messages
now to inform the user WHY something doesn't work. This will be the
last revision that reads single blocks...
----------------------------
revision 1.38
date: 92/09/01 20:21:38; author: tf; state: Exp; lines added/del: 49/46
do_dcmp_stuff() slightly modified.
Object modules created (partly)
Some other minor changes.
----------------------------
revision 1.37
date: 92/09/01 00:06:53; author: tf; state: Exp; lines added/del: 56/35
There was a new bug with the `verify' operation. Since there is only
one DFxInfo structure for each unit (this makes sense!) one had been
initialized twice in verify mode. I've changed this.
Verification does *NOT* detect weak bits (yet).
Verify must be performed on tracks (not blocks) since each track has to
be re-read from disk (not the buffer). CMD_CLEAR or ETD_CLEAR force
the trackdisk.device to do so. Sending this after each block slows down
the performance too much!
Maybe I will also change the compare stuff to be performed on tracks
I don't know yet.
----------------------------
revision 1.36
date: 92/08/31 22:11:22; author: tf; state: Exp; lines added/del: 5/5
dcmp uses ETD_READ instead of CMD_READ now. But disk changes and
SecLabel are ignored (yet). The a_GetLongRequester will complain
now if neither req.library nor reqtools.library is available.
----------------------------
revision 1.35
date: 92/08/31 14:51:34; author: tf; state: Exp; lines added/del: 13/9
Some minor changes in the logfile output.
----------------------------
revision 1.34
date: 92/08/31 14:17:55; author: tf; state: Exp; lines added/del: 73/22
Now (finally) the fucking problems with mounted but non-accessable
devices are solved. There have been minor changes in dcmp.c but
td_support.c changed very much. Nevertheless I log the changes in here
since history will mainly consist of the dcmp.c log messages.
logfile output has changed. log_disktype() added.
----------------------------
revision 1.33
date: 92/08/31 05:19:06; author: tf; state: Exp; lines added/del: 9/9
Gadget's positive/negative borders swapped.
Bug fixed in close_dcmp_stuff().
----------------------------
revision 1.32
date: 92/08/31 03:37:00; author: tf; state: Exp; lines added/del: 216/313
Consequent usage of the DFxInfo structures in td_support.c ;)
dcmp_read() seperated from do_dcmp_stuff().
Global history changes reduced. More return codes now.
Nevertheless enough (too much ?) globals. (Mainly for statistics)
The problems with mounted but non-accessable devices NOT solved (yet).
open_dcmp_stuff() and close....() changed since there are new
open_unit() and close_unit() functions in td_support.c
----------------------------
revision 1.31
date: 92/08/28 22:55:55; author: tf; state: Exp; lines added/del: 121/55
There was a bug with the drives. open_unit() ignored the `Flags' parameter
in the mountlist. `LowCyl' and `HighCyl' were not checked either.
I've changed this.
----------------------------
revision 1.30
date: 92/08/26 21:50:55; author: tf; state: Exp; lines added/del: 123/58
about() added to the [HELP] key. Some other minor changes ;)
----------------------------
revision 1.29
date: 92/08/24 04:13:08; author: tf; state: Exp; lines added/del: 36/46
There had to be tiny changes with the overlay stuff. When someone
clicked onto the overlay_gadget we removed it and (ulghp!) there was
no gadget for a short time. If then the mouse button was released,
a MOUSEBUTTON event was waiting for us immediately after we built-up
the string_gadget. This event made us try to remove our active
string_gadget (not possible!)... But: This bug is (finally) fixed ;)
----------------------------
revision 1.28
date: 92/08/24 00:19:33; author: tf; state: Exp; lines added/del: 532/310
Some functions from data.h moved to here. (functions are not DATA!)
ToolTypes parsing added to wbmain().
Options '-sc' and '-ec' added to main()'s arguments.
Icon creation implemented via '-i' option or ToolTypes
----------------------------
revision 1.27
date: 92/08/23 12:45:48; author: tf; state: Exp; lines added/del: 3/4
Some minor changes.
----------------------------
revision 1.26
date: 92/08/23 03:14:16; author: tf; state: Exp; lines added/del: 11/3
overlay_gadget ghosting added. (fuck it!) Now *EVERY* click outside
the string_gadget will display the overlay_gadget...
----------------------------
revision 1.25
date: 92/08/22 05:17:24; author: tf; state: Exp; lines added/del: 23/15
I've added some lines to do the overlay_gadget stuff in data.h,v 1.9.
The overlay gadget covers the string_gadget and contains the logfile
name without the path name. If it is selected (GADGETDOWN !) it is
replaced by the string gadget containing full path/file name.
The overlay_gadget will return back if either the RETURN key is pressed
to leave the string_gadget (GADGETUP) or a mouse click into our window
(MOUSEBUTTONS) is confirmed.
Pressing another gadget to leave the string_gadget will *NOT* always
re-display the overlay_gadget!!!
----------------------------
revision 1.24
date: 92/08/09 17:16:06; author: tf; state: Exp; lines added/del: 12/7
There was something wrong when swapping first and last CYL since we
always want to start with SEC 00 and end with SEC 10. done.
----------------------------
revision 1.23
date: 92/07/30 22:26:37; author: tf; state: Exp; lines added/del: 11/7
Drive selection via keyboard improved. Gadgets are (re-)drawn properly
now. The string gadget will now be ghosted during operations.
----------------------------
revision 1.22
date: 92/06/22 21:27:20; author: tf; state: Exp; lines added/del: 46/33
I've recoded inform_user(). It works like printf() now and accepts a
variable #of parameters. When started from Workbench (or with -w opt.)
the infotext is limited to 1K.
When appending the logfile data to an existing logfile date and time of
the next operation will be added via the ctime() ANSI function now.
I don't know how to solve the drive-gadget (de)activation problem yet.
----------------------------
revision 1.21
date: 92/06/18 10:19:13; author: tf; state: Exp; lines added/del: 30/28
I destroyed cdglue.c yesterday :(
The recoded version (just checked in) slightly differs from the one used
in dcmp.c,v 1.20. That is why
REV. 1.20 CAN NOT BE USED ANY MORE !!!
Here is revision 1.21 with further changes in handle_keystroke().
Pressing the `L' key now reveals full pathname of the logfile in the
string_gadget before editing.
----------------------------
revision 1.20
date: 92/06/17 20:49:12; author: tf; state: Exp; lines added/del: 964/1044
I've started writing `configuration dependant' stuff.
This means that the availability of certain requester support libraries
is checked and the best of them used.
At the moment req.library and reqtools.library are supported and dcmp won't
complain if none of them is available until you do not try to get a
file requester.
This revision also checks which drives are mounted and disables the
selection of unknown devices.
I've also begun writing my own custom requester and gadget support
functions but it will take some time until I can use them.
----------------------------
revision 1.19
date: 92/06/11 03:14:12; author: tf; state: Exp; lines added/del: 130/99
This revision fully supports reqtools.library by Nico Fran,cois.
His requesters and gadgets fit better into dcmp.c,v since I'm using
3D look as well.
Thanks to Jan van den Baard for writing reqtoolss.lib for DICE!
----------------------------
revision 1.18
date: 92/06/10 15:58:19; author: tf; state: Exp; lines added/del: 81/45
Second disk type information removed out of the logfile.
open_logfile() checks file existance now and appends data if possible.
This version works fine under kickstart 2.0, I've tested this with
Eric's A2000 /w ECS.
----------------------------
revision 1.17
date: 92/06/08 08:17:12; author: tf; state: Exp; lines added/del: 68/27
Some changes in write_statistics() and the calculation of the last block
in handle_keystroke().
----------------------------
revision 1.16
date: 92/06/07 17:36:13; author: tf; state: Exp; lines added/del: 81/38
ErrorRequest() included to be able to inform_user() about strange things
happening when started from Workbench.
(This looks very nice when Arq is active...)
----------------------------
revision 1.15
date: 92/06/07 10:44:35; author: tf; state: Exp; lines added/del: 87/27
I've added write_statistics() that supplies the logfile with more
information. Errors will now always appear in the logfile.
----------------------------
revision 1.14
date: 92/06/07 06:19:36; author: tf; state: Exp; lines added/del: 98/16
I had forgotten to ask for start/end and attempts settings.
Now it's okay.
----------------------------
revision 1.13
date: 92/06/07 05:19:15; author: tf; state: Exp; lines added/del: 97/28
Tonight I've implemented keystroke handling and Workbench startup.
I've fixed some minor bugs and tried to replace the req.library
by the reqtools.library (without success!)
The logfile stuff is still left (for tomorrow) and I also have to
find out why dcmp sometimes is not capable anymore to access any drive!
----------------------------
revision 1.12
date: 92/06/06 22:57:21; author: tf; state: Exp; lines added/del: 79/44
Now the drive/logfile/error settings were looked up from the gadget's
state. This version handles the (un)ghosting properly now, since I've
written on_3dg() <in data.h>
The keystrokes for certain actions are *not* handled yet. Logfile needs
more information...
----------------------------
revision 1.11
date: 92/06/04 01:18:42; author: tf; state: Exp; lines added/del: 454/424
Some rearrangement of the source. (somehow frustrating...)
----------------------------
revision 1.10
date: 92/06/02 22:49:20; author: tf; state: Exp; lines added/del: 359/144
Okay, the window stuff gets better. (and better, and...)
I've got problems with 'un-ghosting' gadgets and the FileRequester
from req.library. Maybe I have to write a Filename[], DirName[],
PathName[] parser by my own, since I only want to see the FileName[]
inside of the StringGadget, but full PathName[] to access the file.
Doing fopen() has to be moved in one of the next revisions. I also
have to change the .logfile/.debug texts. (in the future)
I think this version works quite fine if you do not use the window...
Handling retries (attempts) is okay now, (read)errors are no problem
any longer. ;)
----------------------------
revision 1.9
date: 92/06/02 03:14:45; author: tf; state: Exp; lines added/del: 191/216
Well, this revision differs quite a lott from the last ones.
Source readability has increased very much since I moved things out of
main() into some nice modules.
I've implemented my old support functions for the trackdisk.device and
created run_dcmp() to do the read/compare stuff. This makes ist
possible to use one function for main() and *future* wbmain()...
It's fuckin' late now. Ill retire and we'll se us tomorrow ;)
----------------------------
revision 1.8
date: 92/05/31 23:49:14; author: tf; state: Exp; lines added/del: 191/160
Here we go: new window, new gadgets (nice 3d-look from wb2.0),
different trackframes for head 0 and head 1, etc.
Gadgets are not quite finished yet ... there is plenty of work
left for future revisions.
----------------------------
revision 1.7
date: 92/05/31 07:12:18; author: tf; state: Exp; lines added/del: 31/12
Just fixed a bug in the cylinder colouring routine.
Yet I've got no satisfying idea how to display the differences
on upper- and lower side of a disk. (At the moment you can only
see the difference of cylinders.)
Since I havn't found out anything about wbmain() and _abort() *yet*
I will make the source and the .log file more readable now.
That's all...
----------------------------
revision 1.6
date: 92/05/30 21:39:46; author: tf; state: Exp; lines added/del: 180/117
Some minor changes have been made.
The closing gadget now does it's job, handling has become more
tolerant and again some parameters have changed in order to become
more obvious.
I'll have to find out how to handle ^C since I can't close my stuff
if the user treats me so badly!
[hk] said, that he would like some gadgets in my window... I'll sleep
on it... (I know that a Workbench startup has to be done in any case)
----------------------------
revision 1.5
date: 92/05/30 13:37:15; author: tf; state: Exp; lines added/del: 169/65
The window stuff works quite well now. There have to be some
changes concerning the information displayed...
I've changed the parameters a little and you will get statistics
at the end of the run...
----------------------------
revision 1.4
date: 92/05/29 16:35:14; author: tf; state: Exp; lines added/del: 120/9
Opening a grid window when desired ('-w' option).
Library stuff implemented...
----------------------------
revision 1.3
date: 92/05/29 07:14:33; author: tf; state: Exp; lines added/del: 128/34
Now you can choose start block and end block.
Since you may enter this range in form of tracks, sectors or blocks, the
options variety exploded...
----------------------------
revision 1.2
date: 92/05/29 02:03:13; author: tf; state: Exp; lines added/del: 73/42
Command line parser extended.
Now it's possible to choose the unit numbers.
Added the '-q' (quiet) option.
----------------------------
revision 1.1
date: 92/05/28 23:10:14; author: tf; state: Exp;
Initial revision
=============================================================================