![](/file/21543/10-Tools.zip/smapp100.zip/WWW.ZIP/salmon.gif)
Larsen Source Mapper
Source Mapper is now open source freeware under the terms of the
GNU General Public License as contained in the file COPYING
in the main distribution.
Click here to see an example of
a map produced by Source Mapper.
(smexample.txt - Aprox. 32 kByte)
Click here to see the history
list of Source Mapper.
(smhistory.txt - Aprox. 6 kByte)
Click here to download Source Mapper
for Windows, OS/2 Warp and DOS. Including the source.
(sm10.zip - Aprox. 394 kByte)
About Source Mapper
Source Mapper is a development tool that can be used to make a useful and
human readable map of your C-style source codes. You can generate a map of
a single source file or of a huge project that consists of an unlimited
number of source files.
The produced map can be very useful when you need to document the source
code of your project. I've also found it helpful when digging into sources
written by others.
The produced map is divided into sections. The main sections are:
- Total information and statistics
This includes some statistical information about all the sources of your
project. How many lines are empty? How many lines are real code? How many
functions and comments are there? Etc. You will also find a sorted list
of all source files in the map, with easy-to-find line number references
of where each of the sources begin listening in the map. Each line in the
map will have two types of line numbering. Local (offset line number
within the given module) and global. Local line numbers are referenced
with "L-nnn" while global line numbers are referenced with "G-nnn".
- Function register
Sorted list of all functions in your project. Each function in the
register will show you both the local and the global line number to let
you find the source of the functions quickly.
- List of function calls
With information about by which function each of the functions in your
project is called. This section is not implemented to the map by default.
If you want it you must manually enable it using the ilf[+] option.
- Identifier list
With information about which identifier is used where, and by which
function. This section is not implemented to the map by default. If you
want it you must manually enable it using the iil[+] option.
- List of calling sequences
This is a hierarcial view of how all your functions are called. All top
level functions are listed within separate trees. By default this section is
generated as a compact list, but you may let SM generate it as a flow chart
if you like. To do this you must use the csf[2] option.
- Source lines map
This section lists the source code of the modules in your project.
For each function you will se a list of which function(s) calling it.
You will also se every comment lines clearly marked, as well as a smart
block indentation level marking. Each line will be listed with its
global line number reference, as well as its local.
All this will (by default) be included within C-style comments. This let you
actually compile the map as one-single-huge module.
In addition you have access to a number of other functions in Source Mapper:
- Automatically add a page-break-character above each function/module/section.
You can also put a string (e.g. "/*{Pagebreak}*/") at different locations
in your sources of which SM will automatically replace with a new-page-char
in the map. For more information, see the options NPs[] and NPS[]
(New-Page-String).
- Optional sorting methods.
- Optional level of display output during map generation (see option dis[n]).
- Make/Build/Link options to let you control if SM will delete .smo-files
or not. If you choose not to delete them, then the generation time may be
dramatically reduced the next time you generate a map of the same project.
If one of the source modules has changed, then SM will automatically
rebuild the corresponding .smo-file.
To get help about which functions are availible, just type "sm.exe hlp[]" at
the command prompt, and you are on the road...
Hints and Tips
- Remember: SM isn't actually a compiler. It's just a stupid parser that has
the ability to reqognice most C style code. Therefore, try to write your
code as structured as possible, containing as few odd statements as
possible. This is true if you use much preprocessor code, which SM hasn't
the ability to reqognice as good as it reqognices the true C code.
- If you get some strange error messages (or map output) during the
generation of a source map: Try to delete all SM-object files (.smo-files)
of your project and make the map again. Optionally you can turn the
'dto[+]' option on (auto delete .smg-files after use) to make sure that
SM will always use fresh .smg-files.
- If you get some strange (or maybe even buggy) output from SM, then please
take a close look at the source code of where the error seems to occour.
SM has some problems on parse some rare types of syntax. (See paragraph #1.)
Things to add or fix
- All language dependent information (except text strings) should be user
configurable. This is true for key words of the C language, graphical
characters of lines, etc.
- Support for redirected input/output (stdin/stdout).
- Improved security when creating files. Eventually asking user if it's ok to
write over an already existing file. This is true in case the file is of a
type other than the type that SM is about to create.
- Adjustable default extention of sources and maps (+ other files).
- All error messages should be written to stderr rather than stdout by default.
- Option: Automatic convert from tabulator characters to spaces (in sources).
- Option: Include/exclude external functions to/from list of calling sequences.
- A GUI-shell of where the user can adjust the project and its settings
simply by drag/drop and click using the mouse.
Warranty
Use of this software for any purpose whatsoever constitutes your unqualified
acceptance of the following statements.
The author makes no warranty or representation that the software will be
error free. The author disclaims any warranties, either express or implied,
including but not limited to any implied warranty of merchantability or
fitness for any particular purpose.
The user agrees to take full responsibility for the selection of and any use
whatsoever made of the software.
IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
WITHOUT LIMITATION DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
INTERRUPTION, LOSS OF BUSINESS INFORMATION OR THE LIKE) ARISING OUT OF THE
USE OF, INTERRUPTION IN THE USE OF, OR INABILITY TO USE THIS SOFTWARE, EVEN
IF THE AUTHOR HAS BEEN ADVISED OF ANY POSSIBILITY OR LIKELIHOOD OF SUCH
DAMAGES.
Back to The Larsen Page
Updated May 14, 2000. |
![*](red_ball.gif) |
This page has been accessed |
![](/cgi-bin/Count.cgi?dd=C&df=leifel@online.no-sm1&pad=N&comma=Y) |
times since May 14, 2000. |