Using Tools: 3 File Types

Up: GEOS SDK TechDocs | Up | Prev: 2 Typical Development Session | Next: 4 Esp

You may be curious to know what sorts of files you'll be working with. If you have to work with someone else's code, then being able to find your away around their files (knowing which are sources, which are objects, and which are chaff) can be very useful.

*.goc
These are Goc source files. You will write these files. They contain both standard C code and GEOS constructs (such as objects and messages).
*.goh
These are Goc header files. You will write these files and include others. They provide definitions used by your .goc files (in the same relation as between standard C source and header files). Unlike standard C header files, these are included using the @include Goc keyword.
*.poh , *.ph
These are files generated to optimize the @inclusion of .goh files. Goc will automatically generate these when they don't already exist.
*.doh , *.dh
These are files generated to optimize the @inclusion of .goh files. They contain dependency information.
*.c
These are standard C source files. You may write these as source files, using only standard ANSI C constructions. The Goc preprocessor will create .c files from .goc files. Thus, if you see two files with the same prefix, but one has the .c suffix and the other has the .goc suffix, then you know that the first was created from the second.
Note that Goc will create the generated .c file in the directory where it is invoked. Thus if your development tree contains files PROG\DIR1\CODE.GOC and PROG\DIR2\CODE.GOC, then if you convert these using Goc from the PROG directory, then one of the generated .c files will overwrite the other. Thus, you should never give .goc files the same prefix, even if they are in different directories.
*.h
These are standard C header files. You may write these and include them using the ANSI C #include directive.
*.asm
These are standard GEOS assembly source files, which may be assembled with the Esp assembler, if you have it. They may contain both standard assembly and Esp constructs.
*.def
These are standard GEOS assembly header files, which you may write or include if you have access to the Esp assembler.
*.mk, makefile
These are "makefiles," files which contain scripts which the pmake tool will interpret and use to automatically compile and link your geode. In a source directory there will be a file called MAKEFILE (created with the mkmf tool) and probably a file called DEPENDS.MK (created by calling pmake depend ). If you wish to customize how your geode is made, you will probably write a file called LOCAL.MK, containing your custom makefile script. The INCLUDE directory contains several .mk files, which will be #included by other makefiles.
*.gp
These are "Glue parameter" or "geode parameter" files, which will give the Glue linker information necessary when linking a geode. You will write this file. The pmake program assumes that a geode's .gp file will have name geode.GP, where geode is taken from the name of the directory containing the geode's source (e.g. in the example above, pmake would expect the .gp file to be named PROG.GP).
*.ldf
These are library definition files. Glue uses these files when linking your geode; they determine how your calls to a GEOS library will be encoded. If you are writing a library, then you will create one of these files by means of a pmake lib . The pmake program looks for .ldf files in the INCLUDE\LDF directory.
*.rev
This is a revision file, used to keep track of a program's revision and protocol levels (useful for tracking compatibility). The pmake tool will look for a file with name geode .REV, where geode is taken from the name of the directory containing the geode's source (e.g. in the example above, pmake would expect the .rev file to be named PROG.REV). The pmake program uses grev to create and maintain the .rev file; you should use grev yourself when you need to signal a major revision.
*.rsc
Localization resource file. This file contains information which will be used by the ResEdit localization tool.
*.obj
These are object files. These are files created by a C compiler or Esp which may be linked to form an executable. The pmake program uses Glue to link the object files.
*.ebj
These are error-checking object files. GEOS supports the notion of "error-checking code." When you write your programs, you can mark some commands as "error checking commands." These commands might make sure that a routine is passed valid arguments or perhaps purposefully destroy some information which was not guaranteed preserved by a routine. Such commands may prove time-consuming but are useful for making sure that an application is robust. The pmake program will create two versions of your application--one which includes the EC (Error Checking) code, and one which doesn't. Run the EC program to check for correctness, but use the non-EC version when the program should be fast (i.e. this is the version you should give to your customers).

The .obj files will be linked to form a non-EC executable; .ebj files to form an EC executable.

*.geo
This is a Geode, a GEOS executable (either an application, library, or driver), the end result of your efforts. These are the files containing the code for GEOS programs which the user will interact with. They are created by linking together a number of .obj files, with additional information provided by a .gp file. You will place these files in your GEOS testing directory on your target machine (along with *ec.geo files, described below).
*ec.geo
This is an error checking geode. (See above for quick descriptions of error checking code and geodes.) They are created by linking together a number of .obj and .ebj files, with additional information provided by a .gp file.
*.sym
This is a symbol file, containing symbolic debugging information which the Swat debugger can use to access the geode's data structures.
*ec.sym
This is the symbol file of the error checking version of a geode.
tmp*.*
These are temporary files which pmake will create and destroy while making your executable. The pmake program uses these files to pass arguments to the other tools. Thus, if you see a file of this name in your directory and you didn't create it, you can assume that pmake was interrupted in a recent make and was unable to erase the file (and thus it is safe for you to erase it).
.tcl , .tlc
These are Tcl files, files containing Tool Command Language source code, used by the Swat debugging tool. The .tcl files contain Tcl source code, the .tlc files contain compiled Tcl code. The source code may be edited by any text editor and Swat will interpret it; compiled code runs more quickly, but can only be changed by editing the source code and re-compiling.

If you are writing a GEOS C application, you will write the following types of files:

After you have made your geode the first time (creating a makefile with mkmf , a dependencies file with pmake depend , and the geode itself with pmake ), your directory should contain the following additional file types:


Up: GEOS SDK TechDocs | Up | Prev: 2 Typical Development Session | Next: 4 Esp