WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
File characterization for computer operating and file management systems    
United States Patent5226163   
Link to this pagehttp://www.wikipatents.com/5226163.html
Inventor(s)Karsh; Bruce D. (Los Altos, CA); Myers; Robert K. (Santa Cruz, CA)
AbstractA tool for characterization of files in a computer having an operating and file management system is described. The tool provides consistent definition and design of the functionality and appearance of icons and symbols used with operating environment programs.
   














 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Drawing from US Patent 5226163
File characterization for computer operating and file management systems - US Patent 5226163 Drawing
File characterization for computer operating and file management systems
Inventor     Karsh; Bruce D. (Los Altos, CA); Myers; Robert K. (Santa Cruz, CA)
Owner/Assignee     Silicon Graphics, Inc. (Mountain View, CA)
Patent assignment
All assignments
Publication Date     July 6, 1993
Application Number     07/389,836
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     August 1, 1989
US Classification     707/200
Int'l Classification     G06F 009/45 G06F 015/403
Examiner     Kulik; Paul V.
Assistant Examiner    
Attorney/Law Firm     Davis & Schroeder
Address
Parent Case    
Priority Data    
USPTO Field of Search     395/600 395/700 395/155 395/159 395/160 340/700
Patent Tags     file characterization computer operating file management
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
4813013
Dunn
715/763
Dec,1969

[0 after 0 votes]
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


We claim:

1. The method of characterizing files in a computer system having an operating and file management system, said method comprising the following steps:

deriving the file typing rules according to a preselected command structure, each of said file typing rules including a rule key; and an expression following said rule key defining said file typing rule;

defining a plurality of file types to produce defined file types, said defined file types stored in a file type file;

defining a plurality of type declarations in a file type file, each of said plurality of type declarations associated with and identifying a unique file type;

defining a plurality of file typing rule sets, each of said file typing rule sets associated with at least one of said defined file types, each of said plurality of file typing rule sets further including one of said plurality of type declarations identifying said associated file type, at least one file typing rule defining file functions executable by a user;

compiling said file typing rules to produce compiled file typing rules;

storing said compiled file typing rules; and

characterizing files according to said file typing rules in response to commands received from said operating and file management system.

2. The method as in claim 1 further comprising the step of defining each of said plurality of file typing rule sets to include at least one file typing rule defining the format of said unique file type associated therewith.

3. The method as in claim 1 further comprising the step of defining each of said plurality of file typing rule sets to include at least one match rule, executing said match rule in response to a user input, said match rule assigning a defined file type to a file.

4. The method as in claim 3 further comprising the step of testing a file for a single distinguishing characteristic of the associated file type for said match rule, said match rule evaluates to true if each of said match functions is true when compared to the corresponding distinguishing characteristics of a file under test, a file type being assigned to a file under test if said associated match rule evaluates to true.

5. The method of claim 4 further comprising the step of arranging said match functions in a predetermined sequence from the left, such that the more likely a match function is to be false, when compared to the corresponding distinguishing characteristic of a file under test, the further to the left the match function will be in said predetermined sequence.

6. The method of claim 5 further comprising the step of arranging said plurality of file typing rule sets in a predetermined sequence such that a file under test is compared with the match rule of each of said file typing rule sets in the order of said predetermined sequence, the testing of said file under test terminating as soon as a match rule encountered in said sequence evaluates as true.

7. Apparatus for characterizing files in a computer system having an operating and file management system, said apparatus comprising:

file typing means for deriving file typing rules according to the preselected command structure, each of said file typing rules including a rule key; and an expression following said rule key defining said file typing rule;

said file typing means including a file type file, means for defining a plurality of file types to produce defined file types, said defined file types stored in said file type file, means for defining a plurality of type declarations in a file type file, each of said plurality of type declarations associated with and identifying a unique file type;

said file typing means further including means for defining a plurality of file typing rule sets, each of said file typing rule sets associated with at least one of said defined file types, each of said plurality of file typing rule sets further including one of said plurality of type declarations identifying said associated file type, at least one file typing rule defining file functions executable by a user;

compiling means coupled to said file typing means for compiling said file typing rules to produce compiled file typing rules;

storage means coupled to said compiling means for storing said compiled file typing rules; and

processing means coupled to said storage means for characterizing files according to said file typing rules in response to commands received from said operating and file management system.

8. Apparatus as in claim 7 wherein each of said plurality of file typing rule sets further comprises at least one file typing rule defining the format of said unique file type associated therewith.

9. Apparatus as in claim 7 wherein each of said plurality of file typing rule sets further comprises at least one match rule, said means for determining the file type of a file responsive to a user input for executing said match rule, said match rule assigning a defined file type to a file.

10. Apparatus as in claim 9 wherein said plurality of file typing rule sets are arranged in a predetermined sequence such that a file under test is compared with the match rule of each of said file typing rule sets in the order of said predetermined sequence, the testing of said file under test terminating as soon as a match rule encountered in said sequence evaluates as true.

11. Apparatus as in claim 9 wherein said match rule forms a logical expression comprising a set of match functions conjoined by logical operators, each of said match functions testing a file for a single distinguishing characteristic of the associated file type for said match rule, said match rule evaluates to true if each of said match functions is true when compared to the corresponding distinguishing characteristics of a file under test, a file type being assigned to a file under test if said associated match rule evaluates to true.

12. Apparatus as in claim 11 wherein said match functions forming said logical expression are arranged in a predetermined sequence from the left, the more likely a match function is to be false, when compared to the corresponding distinguishing characteristic of a file under test, the further to the left the match function will be in said predetermined sequence.

13. Apparatus as in claim 7 wherein said computer system further includes:

a graphical description language for generating a plurality of icons providing a graphical user interface representing operations and functions of said computer system; and

said file typing means includes control means for controlling the appearance and functionality of said icons.

14. Apparatus as in claim 13 wherein said graphical user interface provides a visual overview of the file management system utilized by said computer system.

15. Apparatus as in claim 13 wherein said graphical user interface provides a visual overview of file management functions accessible by a user via an input means.

16. Apparatus as in claim 13 wherein said file typing rules include a plurality of icon bounds rules, each of said icon bounds rules associated with a different icon, each of said icon bounds rules defining a selectable coordinate space in which said associated icon is displayed and scales said associated icon consistent with said defined coordinate space.

17. Apparatus as in claim 13 wherein said graphical description language includes selectable instruction sets for defining and generating said icons having selectable size, shape and color.

18. Apparatus as in claim 17 wherein said selectable instruction sets include routines defining icon foreground coloring, icon outlining color and shadow contrast.

19. Apparatus as in claim 13 wherein said plurality of icons are organized in a tree structure representing a hierarchy of said file system.

20. Apparatus as in claim 19 wherein the shape of the visual image representing an icon is representative of said unique file type associated therewith.

21. Apparatus as in claim 19 wherein a number of file operations are defined, each of said file operations associated with at least one of said icons.

22. Apparatus as in claim 21 where the shape of the visual image representing an icon is representative of said defined file operation associated therewith.
 Description Submit all comments and votes
 


BACKGROUND OF THE INVENTION

The present invention relates to computer operating and file management systems, particularly to improvements in tools for such systems which enhance user productivity, system management and availability of such systems to a broader spectrum of user levels of expertise. In the context of this invention a tool, is a compact computer program or routine designed to do a specific task well. Typically, several tools can be linked together to perform more complex tasks.

The present invention may be used with graphical user interfaces for use in computer systems of all types and sizes, including large scale mainframes, workstations and microcomputers, whether or not any of the computers are coupled together in a network. In particular, the present invention provides consistent characterization of system files, and the definition and design of the functionality and appearance of icons and symbols used with operating environment programs.

As more computing power is introduced into microprocessor technology and the cost- and size-per-bit of memory devices decreases, more sophisticated programs can be operated on smaller and more compact computer systems. Thus, stand alone microcomputer systems presently available are beginning to approach the speed and computing power, i.e. instruction through-put, of workstations, which, in turn, are beginning to rival main frame computers in their capacity for processing complex computing operations.

Most computer systems designed for use by sophisticated users require a high level of expertise and long hours of familiarization and setup. Typically, thorough knowledge of complex sets of non-intuitive input/output commands and procedures is required before such users can become productive. If the operating and file management systems are changed very substantially as such systems are improved and enhanced, such users must relearn new commands and techniques before becoming fully productive again. Even experts are hindered by complex mechanics of interfacing with such a system.

Nowadays workstations are often part of, or planned for use in, a network. Networks typically require system administration which in the past has been left to the most expert-level user in view of the complexities associated with management of system resources and users. However, the increasing number of workstation users whose expertise does not include system administration highlights the need to simplify network system administration. In particular, system administration tasks that involve customizing a workstation to a user's needs and preferences can and should be done by the users themselves rather than the system administrator.

Many sophisticated workstation networking systems provide disjoint mechanisms for customizing each work station. These mechanisms usually include modifying some file and following some script or simply issuing a set of commands The scripts and commands normally encrypt a set of non-intuitive options which are focused on completing only one portion of the complete task.

Textual scripts are helpful in getting the job done but lack feedback. Unless the script has good error and detection and correction features, the system manager has no immediate feedback as to whether the process really worked. In the graphical user interface of the present invention, the manager is presented with a view of all of the options and states that disks and file systems can achieve without having to know the difficult commands and procedures to achieve those states.

User acceptance of a PC-like workstation or workstation-like PC is influenced or impacted by the new user's initial impression of how easy or difficult it is to bring the system into productive use. If the system requires the user to learn a set of complex tasks and an array of non-intuitive command lines before he can be productive, he may feel that he is working for the machine rather than that the machine is working for him. Thus, presenting a "view" of the system and how it can be modified to suit the user's needs and preferences is generally regarded as more intuitive and less overwhelming than facing a set of complex input/output commands and procedures.

The popularity of graphical user interfaces, which employ graphic symbols and analog control of cursor movement instead of typewritten entry of commands and cursor keys, has grown very quickly and steadily with the introduction of personal computers for use at home and small businesses by users at all levels of expertise. A visual interface with a computer system helps users feel that their computer is friendlier and, moreover, helps the user work more efficiently and productively with the system.

A user-friendly, interactive, intuitive graphical user interface to powerful computer systems having extensive file and database management systems is advantageous for users at all levels. If such an interface provides an adaptive visual appearance and intuitive flow of information including icons for creating, accessing and manipulating system files, the entry-level (i.e. beginner) user will not be intimidated, the intermediate-level (i.e. average) user broadens his expertise faster, the advanced-level (i.e. expert) user becomes even more productive, and system administration becomes less complex and more efficient.

SUMMARY OF THE INVENTION

A tool constructed according to the principles of the present invention assists the user in managing system files and the actions associated with them by a process called file typing. If used with a graphical user interface, the tool also provides the user with control of the appearance and functionality of file icons.

The present invention is designed for use with powerful, flexible operating systems having the following fundamental characteristics:

1) Substantially, all information is stored in a hierarchy; thus, information may be organized by dividing it into various files and directories, which in turn may have subfiles and subdirectories.

2) Each workstation may support more than one user; thus, the present invention anticipates a multi-user environment.

3) The system may support very sophisticated networking software which allows users to access information on other work stations as easily as if the information was installed on that users work station; if used in a multi-user, networked system the present invention anticipates the need for system administration.

Using the file typing process of the present invention, users can characterize system files, and their associated icons, according to their individual needs and preferences. The user may also determine the functionality of the icons he derives.

Potentially, an unlimited number of possible file types can exist in a system for which the file typing process of the present invention is designed. Such file types include plain text files, formatted documents, directories, shell scripts, images, binary executables and the like. Every type of file is given an associated set of operations, often unique, that a user would most often want to perform with or on such files. The file type declarations and associated rules provide each type of file with potentially unique appearance and behavior customized to the needs and preferences of the user.

As with other systems, icons are used to view file directories, work with existing files and run applications. In addition, icons may be newly created, copied, renamed, removed, printed, transferred or rearranged. Finally, icons may be used for printing the files generated using applications and transferring files to the work-stations or various storage media such as tape. Thus, the tool of the present invention allows the user to use a mouse input device, cursor icons and pop-up menus to interact with the computer system to access sets of files and directories, set personal preferences for how the files and directories should be displayed, launch applications, use basic utility programs and organize files and directories.

The present invention is implemented under the UNIX system. UNIX is highly regarded by experts in computer science as a simple, elegant operating and file management system for use on computers having different processing power, ranging from microprocessors to mainframes, and providing a common execution environment across all of them. The system originally developed and introduced by Bell Telephone Laboratories in 1969, has become increasingly widespread. Different versions of it are supported on the equipment of several different computer system manufacturers. Details of the UNIX system are given in the references listed below which are incorporated by reference as if fully set forth herein.

Bach, M. J., "The Design of the UNIX Operating System," Prentice-Hall Software Series, Englewood Cliffs, N.J., 1986.

Bourne, S. R., "The UNIX Shell," The Bell System Technical Journal, July-August 1978, Vol. 57, No. 6, Part 2, pp. 1971-1990.

Kernighan, B. W., and R. Pike, "The UNIX Programming Environment," Prentice-Hall, Englewood Cliffs, N.J. 1984.

The version of the UNIX system for which the preferred embodiment of the present invention is implemented is called "IRIX", developed and introduced by Silicon Graphics, Inc. IRIX is described in "The IRIX Programmer's Reference Manual," Vols. I, II, III; "The IRIX System Adminstrator's Reference Manual"; The IRIX User's Reference Manual," Vols. I, II; "IRIS-4D Programmers Guide," Vols. I, II; "IRIS-4D System Administrator's Guide"; and "IRIS-4D User's Guide", which are also incorporated by reference as if fully set forth herein.

DESCRIPTION OF THE DRAWING

FIG. 1 is a system block diagram of a computer system for use with a file typing process constructed according to the principles of the present invention.

FIG. 2 is a summary flow diagram for development of a compiled file of file typing rules according to the principles of the present invention.

FIGS. 3A-3C, inclusive, is a summary flow diagram for deriving file typing rules according to the principles of the present invention.

FIGS. 4A-4B, inclusive, is a flow diagram of the executive program for typing a file according to the file typing process of the present invention.

FIG. 5 is a flow diagram of the executive program for closing a file according to the file typing process of the present invention.

FIGS. 6A-6S, inclusive, is a detailed flow diagram of the file typing process of the present invention.

FIGS. 7A-7C, inclusive, is a detailed flow diagram of the opcode "OP TAG" for the file typing process of the present invention.

FIG. 8A illustrates mapping icons to pixels using the bounds rule of the file typing process of the present invention.

FIG. 8B illustrates axes for 3-D icons using the style conventions of the file typing process of the present invention.

FIG. 9A is a flow diagram of the executive program for setting the state of icons, according to the present invention.

FIG. 9B is a flow diagram of the executive program for setting the colors of icons, according to the present invention.

FIGS. 10A-10P, inclusive, is a detailed flow diagram of the iconic rendering process of the present invention.

FIG. 11 is a face view of an iconic interface for a computer file system characterized by the file typing process of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

A typical system for using the file typing process of the present invention includes main computing unit 101, keyboard 102, mouse input device 103 with related pad 104 and monitor 105 as shown in FIG. 1. Operating environment programs in a simulated desktop or other working area metaphor are displayed on the screen of display monitor 105.

In most computer systems, the number of files a user can create is limited ultimately by the amount of memory available in the system. The file typing process of the present invention manages numerous varieties of system files and the actions associated with them. Every type of file, such as plain text files, formatted documents, directories, shell scripts, images and binary executables, is given an associated set of operations, often unique, that a user would most often want to perform on those files. The file type declarations and associated rules that give each type of file a unique appearance and behavior are collectively called file typing rules.

File typing rules determine how a file of a particular type will appear in the operating environment, and also define what functions a user can perform on the file by double-clicking the mouse input device while the cursor is located on an associated icon or choosing menu items to manipulate the contents of the file. The operating environment may use the file typing rules to evaluate all files presented from system memory. File typing rules are also used to customize the look of the icons, modify what happens to the files the icons represent or to create unique icons when the user is developing an application and associated data file.

In the present invention, command lines for accessing and acting on system files are represented by icons. Such command lines are invoked by the user acting upon the icons according to the present invention via the mouse device as if they had been typed in a shell. Thus the present invention provides the user with graphical access for performing sophisticated operations on UNIX-based files.

File typing rules are similar to shell scripts. Shell scripts are well known as files containing UNIX instructions for creating new UNIX commands. Many of the file typing rules are similar also to sets Bourne shell commands. C-shells, Bourne shells and shell scripts are familiar to those skilled in the use of the UNIX operating system.

File typing rules comprise a type declaration, which identifies a unique file type, and a set of as many as seven rules following the declaration. All rules, including the type declaration, consist of a rule key followed by the rule itself. Rules may be multi-line, but continuation lines may not begin with any of the rule keys. A summary of rule keys, the associated rule and the function of the rule is provided in Table I.

TABLE I ______________________________________ File Typing Rule Key Function ______________________________________ TYPE declares a new type MATCH Lets WorkSpace determine if a file is of the declared type. LEGEND Provides a text description of the file type. SUPERTYPE Tells WorkSpace to treat the file as a sub- set of a another type under certain cir- cumstances SPECIALFILE Tells WorkSpace that the file typing rule is to be used only on non-plain files. CMD OPEN Defines a series of actions that occur when the mouse is double-clicked on an icon. CMD ALTOPEN Defines a series of actions that occur when the mouse is alt-double-clicked on an icon. CMD DROP Defines a series of actions that occur when you "drop" an icon on top of another. CMD PRINT Defines a series of actions that occur when you choose `Print` from the WorkSpace or Directory View menus. MENUCMD Defines menu entries and actions that are inserted into the WorkSpace or Directory View menus when an icon is selected. BOUNDS Defines the coordinate space for the file type's icon. ICON Defines the appearance (geometry) of the file type's icon. ______________________________________

A description of file typing rules according to the present invention is given below with continuing reference to FIGS. 2 to 10P.

File Typing Rules

1.1 The Type Declaration

Syntax: TYPE type-name

Description: type-name is a one word ASCII string. Legal type names can be any legal C language variable name. The user should ideally choose a name that is in some way descriptive of the file type it represents. All rules that follow a TYPE declaration apply to that type, until the next TYPE declaration is encountered in the FTR file. Each TYPE declaration must have a unique type name.

Example: TYPE GenericExecutable

1.2 The MATCH Rule

Syntax: MATCH match-expression;

Description: match-expression is a logical expression that should evaluate to true if and only if a file is of the type declared by TYPE. The match-expression must consist only of valid MATCH functions, as described in the section below. The match-expression can use multiple lines, but must terminate with semicolon (;). Multiple match-expressions are not permitted for a given type. The MATCH rule is employed each time a file is encountered by the operating environment, to assign a type to that file.

Example: MATCH glob ("*.h") && ascil;

1.3 Valid Match-Expression

This section describes the syntax and function of valid match-expressions.

Operators, Constants, and Numerical Representation

The following C language operators may be used in a match-expression:

+ - * / & l ! % ()

The following C language conditional operators may be used in a match-expression:

&& ll == !=<> <= >=

The `==` operator works for string comparisons in addition to numerical comparisons.

The following constants may be used in a match-expression:

true false

Numbers in match-expressions may be represented in either decimal, octal, or hexadecimal notation. These representations are given below:

______________________________________ Representation Syntax ______________________________________ decimal num octal Onum hexadecimal Oxnum ______________________________________

FUNCTIONS

Table II describes the set of valid match-expression functions.

TABLE II ______________________________________ Function Syntax Definition ______________________________________ ascii Returns TRUE if the first 512 bytes of the file are all printable ASCII characters. char(n) Returns the nth byte in the file as a signed character: range -128 to 127 dircontains ("string") Returns TRUE if the file is a directory and contains the file named by string. glob ("string") Returns TRUE if the file's name matches string; allows use of the follow- ing expansions in string for pattern matching: { } [ ] * ? and backslash (see sh(1) filename expansion). linkcount Returns the number of hard links to the file. long (n) Returns the nth byte in the file as a signed long integer; range -2.sup.31 to 2.sup.31 - 1. mode Returns the mode bits of the file (see chmod(1)). print (expr or "string") Prints the value of the expression expr or string to stdout each time the rule is evaluated; used for debugging. Always returns true. short (n) Returns the nth byte of the file as a signed short integer; range -32768 to 32767. size Returns the size of the file in bytes. string (n,m) Returns a string from the file that is m bytes (characters) long, beginning at the nth byte of the file. uchar (n) Returns the nth byte of the file as an unsigned character; range 0 to 255. tag Returns the specific WorkSpace application tag injected into an executable file by the tag injection tool (see tag(1) in Appendix D, "WorkSpace Man Pages"). ushort (n) Returns the nth byte of the file as an unsigned short integer; range 0 to 65535. Returns-1 if the file is not a tagged file. ______________________________________

1.4 Building Effective MATCH Rules

A match rule consists of a sequence of expressions, each of which checks a file for positive distinguishing characteristics. The most effective way to order these expressions in a single MATCH rule is to choose a set of expressions, each of which tests for a single characteristic, and conjoin them all using `and` conditionals (&&).

The order in which the expressions in a MATCH rule are conjoined may have an effect on the efficiency of the rule's evaluation. The user should always try to order the expressions so that the maximum number of files are `weeded out` by the first expressions. The reason for this is that, as in the C language, && will stop evaluation as soon as one side of the conditional is found to be false. Therefore, as a rule of thumb, the more likely an expression is to be false, the further to the left of the MATCH rule you should place it.

For example, one possible way to match a C source file is with the following rule:

MATCH glob ("*.c") && ascii;

Note that it is more efficient to place the glob ("*.c") expression first because there are many more files that do not end in ".c" than there are files that are not ASCII text.

The user should also make sure that the match rule is specific enough not to "catch" any unwanted files. FTR files are scanned sequentially (see Section 2.10, "Comparing FTR Rules"), so if a type is defined with the following MATCH rule at the beginning of the FTR file,

TYPE foo

MATCH ascil;

every text file in the system will be defined as a file of type `foo`.

1.5 Tagging Executables

The most preferable way to match a specific executable to a file typing rule is to "tag" it with a unique 32-bit number. tag (1) allows the user to inject a 32-bit tag safely into a shell script of MIPS executable, where it can be read by a MATCH rule using the tag match-expression function (see Section 1.3).

1.6 Programming the IRIS Operating Environment

An operating environment in accordance with the present invention is the IRIS Operating Environment, developed and introduced by Silicon Graphics, Inc. IRIS, including its icon-based interface called WorkSpace, is described in "Programming the IRIS WorkSpace"; "The Personal IRIS Owner's Guide"; and "The IRIS-4D Series Owner Guide", which are also incorporated by reference as if fully set forth herein.

The upper 16 bits of the tag number are reserved for vendor ID, for separate administration by the vendor. The lower 16 bits are for general use. Several uses values for the lower 16 bits have been defined, which Operating Environment recognizes:

__________________________________________________________________________ /* The different classes of how to launch an executable __________________________________________________________________________ */ # define GENERICEXEX 0x00000000 /* this can be windowed or no output */ # define LAUNCHEXEC 0x00000100 /* fires a launch window for arg input */ # define OUTEXEC 0x00000200 /* output only wsh */ # define TTYEXEC 0x00000400 /* wsh that takes input and ouput */ # define TTYLAUNCHEXEC TTYEXEClLAUNCHEXEC # define TTYOUTEXEC TTYEXEClOUTEXEC # DEFINE TTYLAUNCHOUTEXEC TTYEXEClOUTEXEClLAUNCHEXEC /* Define to represent the number of args an executable expects */ # define ARGSO 0x00000000 # define ARGS1 0x00000001 # define ARFS2 0x00000002 # define ARGS3 0x00000004 # define ARGSO-1 0x00000008 # define ARGSO-N 0x00000010 # define ARGS1-N 0x00000020 __________________________________________________________________________

1.7 The Legend Rule

Syntax: LEGEND text-string

Description: text-string is a string that describes the file type in plain language a user can understand. The legend is used to describe the file in the Get File Info window. It is also used when a Directory View window is set to display as a list. Legends that are longer that 25 characters may be truncated in some circumstances.

Example: LEGEND C program source file 1.8 The Supertype Rule

Syntax: SUPERTYPE type-name [type-name . . . ]

Description: The SUPERTYPE rule is used to indicate that a particular file type can be treated as a part of a more general file type for under certain conditions. A special case in the operating environment is directories; the user may wish to create a directory with a custom icon, yet still have the OPEN and ALTOPEN rules work as a normal directory. (Note: the operating environment automatically handles the OPEN and ALTOPEN rules for directories; the OPEN and ALTOPEN rules are placeholders.) A unique directory TYPE, with its own ICON rule may be created, but if SUPERTYPE is used, it will work like a standard directory (see example.) SUPERTYPE is also very useful for printing, where a custom file type may want to be printed as, say, an ASCII file. The user can also make use of SUPERTYPEs in separate OPEN, ALTOPEN, DROP, and PRINT rules by using is Super (1) as part of those rules. A given file typing rule may contain several different SUPERTYPE rules, and thus be considered a subset of several more general file types.

______________________________________ Example: TYPE MyDirectory SUPERTYPE Directory ______________________________________

1.8 The Special File Rule

Syntax: SPECIALFILE

Description: SPECIALFILE is used to distinguish a file typing rule used for matching non-plain files. Device files, and other non-plain files can cause damage to physical devices if they are matched using standard file typing rules. Special files are only matched using rules containing SPECIALFILE, which are written so as not to interfere with actual physical devices. Similarly, plain files are not matched using rules containing a SPECIALFILE rule.

Example: SPECIALFILE

1.2 The Command (CMD) Rules

The CMD rules determine how an icon behaves when a user interacts with it, whether it is by clicking, dragging, or through menu selections.

1.10 The CMD Open Rule

Syntax: CMD OPEN sh-expressions[; sh-expression; . . . ; sh-expression]

Description: The OPEN rule is invoked when any field of the appropriate type is double-clicked, or selected and opened from the operating environment or directory view Menu via the `Open` menu item. The OPEN rule should reflect the most often used function that would be applied to a file of the given type. sh-expression can be any valid Bourne shell expression. Any expression may use multiple lines. Any number of expressions may be used, and must be separated by semicolons (;). The final expression should not end with a semicolon. Variable may be defined and used as in a Bourne shell script, including environment variables. These environment variables may be used to refer to the currently selectioned icons within the operating environment or directory view.

Example: CMD OPEN $wineditor $files

1.11 The CMD ALTOPEN Rule

Syntax: CMD ALTOPEN sh-expression[;sh-expression; . . . ; sh-expression]

Description: The ALTOPEN rule is envoked when any file of the appropriate type is double-clicked while the ALT key is depressed. The ALTOPEN rule provides added functionality for power users. sh-expression can be any valid Bourne shell expression. Any expression may use multiple lines. Any number of expressions may be used, and must be separated by semicolons (;). The final expression should not end with a semicolon. Variables may be defined and used as in a Bourne shell script, including environment variables. These environment variables may be used to refer to the currently selectioned icons within the operating environment or directory view.

Example: CMD ALTOPEN make

1.12 The CMD DROP Rule

Syntax: CMD DROP sh-expression[; sh-expression; . . . ; sh-expression]

Description: The DROP rule is invoked whenever a selected (file) icon is "dropped" onto another icon in the operating environment or directory view Windows. When this happens, operating environment checks to see if the file type that is being dropped upon has a DROP rule to handle the files being dropped. In this way, the user can write rules that allow one icon to process the contents of other icons simply by dragging the icons selected for processing onto the top of the target icon (i.e., the one with the DROP rule).

Example: CMD DROP $TARGET $SELECTED

1.13 CMD PRINT Rule

Syntax: CMD PRINT sh-expression[;sh-expression; . . . ;sh-expression]

Description: The PRINT rule is invoked whenever a file of the appropriate type is selected and printed using a print menu item form the operating environment or directory view menu. sh-expression can be any valid Bourne shell expression. Any expression may use multiple lines. Any number of expressions may be used, and must be separated by semicolons (;). The final expression should not end with a semicolon. Variables may be defined and used as in a bourne shell script, including environment variables. These environment variables may be used to refer to the currently selectioned icons within the operating environment or directory view. The recommended method of implementing the PRINT rule is to use the print-job routing utility from the operating environment.

Example: OMD PRINT routeprint $LEADER $REST

1.14 The NEMUCMD Rule

Syntax: MENUCMD "string" sh-expression[;sh-expression; . . . ;sh-expression]

Description: MENUCMD inserts the menu entry string into the operating environment or directory view menu if a single file of the appropriate type is selected, or a group all of the same appropriate type is selected. If the menu entry is chosen, the actions described by the sh-expressions is performed on each of the selected files.

Example: MENUCMD "Empty Dumpster" rm-rf $LEADER/*

1.15 The BOUNDS Rule

Syntax: BOUNDS x0, y0, x1, y1

Description: x0, y0, x1, y1 define, respectively, the lower left and upper right corners of the bounding rectangle of the coordinate space in which the icon is displayed. The values are separated by commas (,). When the operating environment paints the icon, it scales the icon so that its bounds fit just within the fixed layout area reserved for it. The aspect ratio of the bounding rectangle is preserved. If no BOUNDS rule is supplied for a file type's icon, the bounding rectangle defaults to 0.0, 0.0, 100.0, 100.0. Referring to FIG. 8A, an example of as scaleable icon having the bounds -20.0, -20.0, 50.0, 75.0 is shown.

1.16 The ICON Rule

Syntax: ICON icon-description-routine

Description: icon-description-routine is a routine written using the icon description language, detailed below. The routine can continue for any number of lines. The ICON rule is invoked any time a file of the specified type needs to be represented in the operating environment or a directory view. The rule is evaluated each time the icon is painted by the application that needs it.

______________________________________ Example: ICON color(iconcolor); bgnoutlinepolygon( ); vertex(0,0); vertex(0,60); vertex(40,60); vertex(40,0); endoutlinepolygon(outlinecolor); ______________________________________

1.17 The Icon Description Language

The icon description language is a restricted subset of the C programming language, including line and polygon drawing routines from any well-known graphics library routine. The description routine for a given icon is similar in structure to a C subroutine, but lacking the subroutine and variable declarations and the outermost enclosing brackets. The valid symbols and functions in the icon description language are described below.

Operators

The following C language operators may be used in an icon description routine:

+ - * l & l ! % = () {}

The following C language conditional operators may be used in an icon description routine:

&& ll == != <> <= >=

Constants

The following logical constants may be used in an icon description routine:

true false

The following icon color constants is described in Section 1.18, "Drawing Icons".

Variables

The following icon status variables are set by the operating environment, and may be used in an icon description routine:

current disabled opened located selected

These variables have values of either true or false. They can be used in a conditional statement to alter the appearance of an icon when it has been manipulated in various ways from the operating environment (see Section 1.18, "Drawing Icons").

Other legal C variables may be used in an icon description routine without need of a declaration; all variables are represented as type float. Any variable name is acceptable, provided it does not collide with any of the predefined constants, variables or function names in the icon description language.

Functions

The icon description functions comprise, for the most part, a very restricted subset of the C language version of a graphic library routine modified for 2-D drawing. Table III describes the set of valid icon description functions.

TABLE IIIA ______________________________________ Function Syntax Definition ______________________________________ arc (x,y,r,startang, endang) Draw an arc starting at icon coordinates x, y, rad- ius r, starting at angle star- tang, ending at angle endang. Angle measures are in tenths of degrees. arcf (x,y,r,stratang, endang) Like arc, but filled with the current pen color. bclos (color) Like pclos (see below) but uses color for the border (outline) color of the poly- gon. bgnclosedline ( ) Begin drawing a closed, un- filled figure drawn in the current pen color. Used in conjunction with vertex and endclosedline. bgnline ( ) Like bgnclosedline, except the figure is not closed. Used in conjunction with vertex and endline. bgnoutlinepolygon Begin drawing a polygon filled with the current pen color. The polygon is outlined with a color spec- ified by endoutlinepolygon. Also used in conjunction with vertex. bgnpoint ( ) Begin drawing a series of unconnected points defined using calls to vertex. Used in conjunction with vertex and endpoint. bgnpolygon ( ) Like bgnoutlinepolygon except the polygon is not outlined. Used in conjunc- tion with vertex and endpolygon. color (n) Set current pen color to color index n. draw (x,y) Draw a line in the current color from the current pen location to x, y. endclosedline ( ) Finishes a closed, unfilled figure started with bgnclosedline. ______________________________________

TABLE IIIB ______________________________________ Function Syntax Definition ______________________________________ endline ( ) Finishes an open, unfilled figure started with bgnline. endoutlinepolygon (color) Finishes a filled polygon started with bgnoutlinepolygon and out- lines it with color. endpoint ( ) Finishes a series of points started with bgnpoint. endpolygon ( ) Finishes a filled, unoutlined poly- gon stared with bgnpolygon. for Standard C for-loop. if (expr) expr [ else expr ] Standard C language if-statement. move (x,y) Move current pen location to x, y. pclos ( ) Draw a line in the current pen color that closes the current poly- gon, and fill the polygon with the current color. pdr (x,y) Draw the side of a filled polygon in the current pen color, from the current pen location to x, y. pmv (x,y) Begin a filled polygon at location x, y. print (expr of "string") prints the value of the expression expr or string to stdout; used for debugging vertex (x,y) Specifies a coordinate used for drawing points, lines, and poly- gons by bgnpoint, bgnline, bgnpolygon, etc. ______________________________________

1.18 Drawing Icons

Any points, lines, or polygons the user draws will "stack" in the order they are drawn, with the most recently drawn polygon on top. This concept is used to easily achieve drop-shadow effects, by drawing the same polygon twice, using different pen colors, and offset.

There are three icon color constants are recommended for standard icon use; iconcolor for drawing polygons that make up the "foreground" of the icon, outlinecolor for outlining and linework, and shadowcolor for contrasting drop shadows. iconcolor is particularly useful, because it automatically changes to the calling application's preferred color conventions when a given icon is located, disabled, or selected.

The various icon status variables are used to change the appearance of an icon when it is opened, located, selected, or disabled. The following code fragment illustrates how to draw an icon that changes appearance when it wa