home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
fish
/
801-810
/
ff806
/
xsearch
/
english
/
xsearch.doc
< prev
next >
Wrap
Text File
|
1993-01-24
|
29KB
|
650 lines
X S E R I E S / P E E K E R B I T S
-------------------------------------
XSearch 1.1
©/Program 1992 SP/PeekerBits
Author:
Stefan Plöchinger
Kleiststraße 27
DW- 8012 Ottobrunn
programmed in KICKPascal (MAXON GmbH)
requiring AMIGA OS2.0
minimum of stack size: 20000
···········
XSearch 1.1 is FreeWare. All rights prohibited. The program
may only be distributed for non-commercial purposes.
···········
1 . T H E P U R P O S E O F X S E A R C H
Well, everyone knows the problem: Where is this sh... file on the
HardDisk. I know the name, but not the place. XSearch ought
to help you in such a situation. It searches files on a
device.
¡! I'll always talk of files to search. But of course you can
also search directories. Maybe some things can only refer to
files, in this case, I'll write it down in this .doc, and in
this case, too, you can tell the program what to do with direc-
tories (in the Preferences Requester). You'll read more about
this later.
2 . T H E C O N C E P T I O N O F X S E A R C H
XSearch has been divided in three seperate modules (of course
included in one executeable file). These modules are:
· Options module: In this module, you tell XSearch what to
search and how to do this.
· Places module: In this module, you can select the directories
and files XSearch searches in.
· Searching module: Here, XSearch searches.
When in the Options module, you can go to the Places and to the
Searching module, when in the Places Module, to the Options and
the Searching module. In the Searching module, you can go to
the module in which you went to the Searching module.
3 . H A N D L I N G , G E N E R A L L Y
XSearch is as easy to handle as every OS2.0-supporting AMIGA
program. Perhaps you'll know about Application windows
and the User Interface Style Guide (Gadgets are selectable
by keys, menus are built as Commodore's standards want it and
so on). Well, you'll find it in XSearch.
Well, and finally a warning concerning the handling: always
press Enter or Tab after having edited a text in a text gadget.
4 . P R O J E C T S
Important: XSearch owns the possibility to generate projects.
This means, all the things you did in the Options or the
Places module can be stored on a device like the text in a
word processor. For this purpose, you'll find these menus
in each module window of XSearch.
Project » Title of the menu :-)
New A N » Opens a new project with the standard
options
Open... A O » Loads a saved project
--------------------
Save A S » Stores the current project using the
current name
Save as... A A » Stores the current project using a name
specified in an appearing file requester
--------------------
Preferences » Brings up the Prefs window
About » Shows some Informations about me :-)
Quit A Q » Well, I think, it quits XSearch
In the Searching module, simply the first two menu items aren't
shown.
The current project name is shown in the window title:
+---+----------------------------------------------+---+---+
| · | XSearch 1.1 - {project name} | · | · |
|---+----------------------------------------------+---+---|
: :
5 . P A R A M E T E R S T O X S E A R C H
This is a new option of V1.1. Its main advantage is to be able to
specify the path to the configuration and the standard values file.
The parameters are read like this: When started from the CLI,
XSearch first checks the CLI arguments. Then, it tests whether there
are tool types in the XSearch program icon. When started from the
workbench, only the last thing is done.
5.1 CLI ARGUMENTS
Template: "FILE,CONFIG,VALUES"
This template is a standard Commodore template. The single options
specifyable are:
"FILE": The project XSearch ought to load at the beginning.
"CONFIG": The path to the configuration file (may be "STD" for
"ENVARC:XSearch.Config").
"VALUES": The path to the standard values file (may be "STD" for
"ENVARC:XSearch.Std").
5.2 WORKBENCH ARGUMENTS
These are the possible tool types of XSearch:
"CONFIG=": The following string is the path to the config file
(may be "STD" here, too).
"VALUES=": The following string is the path to the values file
(may be "STD" here, too).
You may select a second file when starting XSearch. If it is
a XSearch project, XSearch loads it at the beginning.
6 . T H E O P T I O N S M O D U L E
6.1 WINDOW
+---+----------------------------------------------+---+---+
| · | XSearch 1.1 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +---+------------+ |
| | & | Options | |
| +---+------------+ |
| |
| +--+ +-----------------------------+ |
| | | Name: Pattern | | |
| +--+ +-----------------------------+ |
| |
| . |
: : :
| |
| +----------+ +--------+ |
| | Search | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
| {messages} |
+----------------------------------------------------------+
{messages}: Here, several messages are shown (e. g. error msgs).
Zoom gadget: Selecting this, the window will be iconified.
"Name:": The gadget left of this shows if the option "Name Pattern"
is to be used when searching.
"Pattern:": Here, in this text gadget, you specify the name
pattern. More about these two gadgets later.
(Below these gadgets, there are several others. Later more, too.)
"Options": Pressing this Cycle gadget means changing to the
Places module.
"Search": Pressing this gadget means starting the search and
going to the Searching module (what else?).
"Quit": Hope it's clear.
6.2 HANDLING
As already mentioned in 6.1, all the options are specified in
text gadgets. But even when there is data specified, an option
can be turned off by pressing the gadget on left side of the
text gadget.
These options exist: Name patterns, length control, control of
file attributes, time specifications, Comment and IFF patterns
and file-internal search.
The options "en detail":
· Name pattern: Here you can specify an AMIGA-typical pattern
like "#?.c". Only files on which these pattern matches
are accepted.
· Length control: Here, you can select files which are bigger
than a certain value, and which are smaller than another one.
In a small graph, this looks like this:
+············[--------------O--------]··········· · · · ·
0 /|\ /|\ /|\
minimum of size File size |
maximum of size
The line represents the size. You specify the maximum and the
minimum. Only the files between or on these frontiers are
accepted.
These are the rules if the value in ">=" is bigger than the one
in "<=":
+------------]·······················[---------- - - - -
0 /|\ /|\ /|\ /|\
| minimum of size | File size²
File size¹ maximum of size
The line represents again the size. But this time, only files
are accepted when their size is under the minimum or over
the maximum, or of course if the size is equal to one
frontier.
The length option only affects files.
· Control of file attributes: Here you can control the file
attributes of an AMIGA file. The string in the text gadget
can be built up by these chars:
· -: The attribute mustn't be set.
· *: The value of the attribute is uninteresting.
· h/s/p/a/r/w/e/d: These are the eight file attributes. They
can only be used in this order. Using them means that
an attribute has to be set.
Some examples:
----RWED: The HSPA-attributes mustn't be set, in contrast to the
RWED-attributes.
****RWED: The HSPA-attributes don't matter, the RWED-attributes
have to be set.
RWED****: This isn't acceptable. RWED isn't at the right po-
sition.
HSPA----: The HSPA-attributes have to be set, the RWED-attributes
mustn't.
· Time specifications: With every file, the point of time
is stored when it has been changed last. You can select certain
files by specifying two points of time between the 12-31-77/
12-31-1977 (notification may be set in the Preferences reques-
ter) 23:59:59 and the 1-1-2000 00:00:01. If the second date
is earlier than the first, there is the same exclusion of files
as when controlling the length.
· Comment pattern: The same as the name pattern, but with the
comment of a file.
Instead of a checkbox on the left side of the text gadget, there
is a cycle gadget with three possible states:
"-": The comment isn't examined.
"G=k": The comment is examined, the case (sensitive or insen-
sitive) isn't controlled.
"G÷k": The comment is examined, the case is controlled.
· IFF pattern: Using this option, you can select IFF-Files.
Specify an IFF filetype, and the file currently searched will
be (if the option is turned on, of course) controlled if it's
an IFF file, and if the IFF pattern matches.
IFF files vary in their basic structure: there are IFF-FORM
files (very common), and IFF-CAT and IFF-LIST files (not
very common, not common either). If XSearch supported CAT and
LIST, the whole file had to be searched (now guess if it supports
them), and if supporting only FORM, simply the beginning of a
file has to be examined.
In the text gadget, you may specify all IFF types. The have
to be listed in this way:
TYPE{|TYPE{|TYPE{|...}}}
This means for example:
"ILBM|ANIM": All ILBM (DPaint Pictures) and ANIM (DPaint Ani-
mations) IFFs are searched.
"ILBM": Only ILBM IFF types are searched.
IFF types can only contain letters from A to Z, numbers from
0 to 9 and spaces.
The length option also only affects files. You can specify
in the Preferences requester what to do with Non-IFF files
when searching.
· File-internal search: A file is read and it is looked if
the pattern you specified in this text gadget matches to
one line of the file. Then, the file is accepted. You may
specify again if the case is sensitive or not. Of course,
this option only affects files again.
¡! Don't think that this option is very flexible. It's not
very fast and not very safe either, I must say. I'm sorry
for this, but I've been "too tired" to add a highly tuned file-
internal searching routine.
Additionally: XSearch is very flexible in accepting data from the
text gadgets. E. g., it converts a "1-1-92" in the "Date Field"
into a "01-01-92", a space in the "Attribute Field" into a "*",
and seperators like ",", ";" or " " in the "IFF Field" into a "|".
6.3 FINE TUNING
You can find an own menu for the Option settings:
Options » What could this be?
Standard values » You may save options as standard
values (4th menu item). You take them
over in the current project by
selecting this menu item.
out of Project... » Takes over the options out of another
XSearch project.
out of File attributes...
» Takes over the options out of the
attributes of a file (only a file!).
-----------------------
Save as Standard values » Store the current options as the
standard values in "ENVARC:XSearch.Std"
Additionally: The Options window is a so-named Application Window.
This means that you can drag icons of the Workbench over this
window and drop them there. XSearch will react as if you loaded
this file in the file requester of "out of file attributes..." and
will make the combination requester appear (the one which appears
when choosing "out of file attributes...", too).
Under V1.1, it is possible to drag 'n drop directory icons over
the Options window, too. If you want to specify a directory in
the filerequester appearing after choosing "out of File
attributes...", you have to clear the file string.
A few more things about the combination requester: It appears after
selecting an "out of..." menu item. On the left, there is a list
in which you may specify the file attributes or the options to
import. On the right, there are some radio buttons - but only if
you chose "out of File attributes...". Having selected a dir, then
you can specify here in which of the "Time" textgadgets the date
of the dir is to be taken over. Having selected a file, you
can do the same with the date of the file. Additionally, then here
also appear two other radio buttons. With them, you can specify
in which of the "Length" textgadgets the length of the file is
to be written. In every case, you can find the checkbox "active
autom." on the right. Selecting it means telling the program
to turn on every option you have specified in the list on the left
side when selecting "OK". Turning on the cycle gadgets of "Comment"
and "file-internal search" means setting the values specified
in the configuration. "À propos": In the list on the left, you
sometimes (at every option standing for a string) can not
only select the entry with "·", but also with "+". Having selected
an entry this way, the string represented by the entry is added
to the string already being present in the represented text gadget,
only seperated by a "|".
7 . T H E P L A C E S M O D U L E
7.1 WINDOW
+---+----------------------------------------------+---+---+
| · | XSearch 1.1 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +---+------------+ |
| | & | Places | |
| +---+------------+ |
| |
| +-----------------------+ +-----------------------+ |
| | | | | |
| | | | | |
| | +-----+ | |
| | | |<-- makes exchange | |
| | +-----+ between the both | |
| | File-/Dir- +---+ | lists possible | |
| | list | · | | | |
| | +---+ | | |
| | | # | | | |
| | +---+ | List of all | |
| | +---+ | search places | |
| | | + | | | |
| +-----------------------+---+ | | |
| +-------------+---+---+ +---+ | |
| | Devices | : | / | | - | | |
| +-------------+---+---+ +---+ | |
| +---------------+ | ± | | |
| Dir | | +---+ | |
| +---------------+ +---+ | |
| +---------------+ | · | | |
| Ptt. | | +---+ | |
| +---------------+ | # | | |
| +---+-----------------------+ |
| |
| +----------+ +--------+ |
| | Search | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
| {message} |
+----------------------------------------------------------+
"Places": Changes to the Options Module.
the are on the left: This area wors like a file requester.
the gadget making exchange between both lists possible:
This gadget is a checbox. If it's selected, the File-/Dirlist
on the left side of the window changes. If you select an entry
there, an "·" appears in front of it. This means the file or
dir is selected. You deselect it in the same way.
the list of all search places: Here all files select left can be
taken over. This is also the list in which all places are
stored XSearch will search in when in the Searching Module.
All entries in this list can be selected.
"·": Selects all entries of a list.
"#": Reverses the selection of a list.
"+": All selected entries left are taken over to the list of
search places right.
"-": All selected places right are removed out of the list.
"±": Every directory right has a certain property: you may
specify if, when XSearch searches in this dir, the sub-
dirs ought to be searched, too. If this is the case, there is
a "D" in front of the dir's name, if not, there's a "d".
With this gadget, the state of each selected dir on the right
is changed.
"Search"/Quit: Guess what.
7.2 FINE TUNING
You may use "Drag and Drop" again. If you drag an icon over
the file/dir list on the left, the icon's dir will be loaded
there. If you drag it anywhere else, the icon's name will appear
in the list of search places.
Double-clicking on an entry right loads the dir of the entry
double-clicked on in the file list on the left.
8 . S E A R C H I N G M O D U L E
+---+----------------------------------------------+---+---+
| · | XSearch 1.1 - {project name} | · | · |
|---+----------------------------------------------+---+---|
| +-----------------------+ +-----------------------+ |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | list of results | | path list | |
| | +---+ | | |
| | | · | | | |
| | +---+ | | |
| | | # | | | |
| +-----------------------+---+ +-----------------------+ |
| +---------------+ +-----+ +------+ +---+ |
| in | & | Clipboard | | New | | Stop | | | Pause |
| +---------------+ +-----+ +------+ +---+ |
| +----------+ ----------------------- |
| | copy | +----------+ +--------+ |
| +----------+ | Cancel | | Quit | |
| +----------+ +--------+ |
+----------------------------------------------------------+
list of results: Here, the results of the searching process are
displayed. The entries may be selected.
path list: If XSearch is still searching, the current searching
path is displayed here.
If not, you may select a file or dir in the list of results,
and then, its path will be displayed here.
If the dir to display was "DH0:System/Icons", the list would
look like this:
DH0:
System
Icons
{file, if necessary and not searching}
"in Clipboard"/"copy": The cycle gadget "in" has two states:
"Clipboard" or "File". If you press "copy", the paths of
all selected entries in the list of results are copied to
the thing that is selcted in the "in"-gadget. In the case
of "File", a file requester appears.
"New": Restarts the searching process.
"Stop": Stops the searching process.
"Pause" (Shortcut: Space): If this checkbox is turned on, the
search process is paused, and vice versa.
"Cancel": XSearch returns to the modul out of which you went
to the Searching module.
"Quit": Guess what (again).
9 . P R E F E R E N C E S
You enter the Preferences by selecting the Menu item "Preferences"
in the Project menu.
You can set the following things:
"Start with": Here, you select in which module to start
"in dir.:" Here, specify the dir in which the Places Module ought
to start. Specifying "" (two inch chars/Shift-2) means starting
in the devices list. This will also be caused if the directory
specified here couldn't be accessed when starting XSearch.
You may also specify nothing, then, XSearch will start in the
current directory (if not accessable, also in the devices list).
Selecting "Get..." brings up a directory requester in which
you can specify the dir comfortably.
"Projects in": Here, specify the standard project directory.
Specifying nothing means again starting in the current dir,
and if the dir specified here or the current dir couldn't be
accessed, XSearch searches the projects in "RAM:".
"Dir. with Subdirs": In the Places Module, a directory can
be specified as a directory in which the subdirs are also
searched or not. Here specify what the standard is when
taking over a dir from the filerequester list to the list
of search places.
"Case sens.": Taking over values out of an another project or
out of certain file attributes gives the possibility to
active automatically the options taken over. When taking
over the comment or file-internals, XSearch doesn't know,
if instructed to set the options automatically, if it ought
to set the options to case senstive or insensitive. Specify
here.
"Textgadg. coloured": XSearch can colour the background of a
text gadget. Specify here if it should or not.
"Date": Here, specify the date format. DD means days in two
numbers, MM the months and YY the years. "." and "-" are the
seperators.
"current Date when new values": Specify if, when having selected
"New" or "Standard values", the current date ought to be
entered in the "Time" fields.
"Dir. at length control": The probolem mentioned above: What
should be done with a directory if checking for the length?
A dir has no length, so you can tell XSearch here what to
do: you may say that it ought to pass the dir (takes the
dir over in the list of found files and dirs if the other
options are true) or that it ought to exclude it (not take
it over in any case).
"IFF control": The same as "length control", but when XSearch
controls IFF files and not the length.
"file-internal search": The same as "length" or "IFF", but with
the file-internal search.
"other files at IFF": You may specify what should be done with
non-IFF-files when controlling the IFF type (pass or exclude).
"Save": Stores the settings and leaves the requester.
"Use": Leaves the requester and uses the settings now specified.
"Cancel": Leaves the requester and uses the settings that were
used before going into the Preferences requester.
Since V1.1, the XSearch Preferences window owns a menu in which
you can switch between the default XSearch Prefs, the last saved
prefs and the current prefs. It's built up like any Preferences
"Edit" window.
···········
Finally, I'd like to do two things:
· Say sorry for my bad English
· Say thanks to some certain persons:
My English teachers trying to improve my English :-),
Felix Hermann for the beta-testing,
the new "Bayern 3" (A radio station. What, you didn't know?)
for music support,
Commodore for OS2.0, AMIGA Corp. for the AMIGA and
Jens Gelhar for KICKPascal
PS: Who wants to support a poor 16-year-old pupil to help to
get his 68030-processor-card? My adress is a the beginning of
this doc (any currency accepted).
···········
X S E A R C H P R O G R A M H I S T O R Y :
V1.0 First "Final Release", particularly with Bugs, but -
IT WORKS!
V1.1 the majority of the bugs of V1.0 has been removed, it is
possible to give parameters to XSearch, you are able
to drag 'n drop dir icons in the options window and the
preferences window has a menu like the Preferences "Edit"
menu now