[Top bar]
[Bottom bar]
This document is available in: English  Castellano  Deutsch  Francais  Nederlands  Turkce  

convert to palmConvert to GutenPalm
or to PalmDoc

[Photo of the Author]
by Guido Socher

About the author:

Guido is a long time Linux fan. His Linux home page can be found at www.oche.de/~bearix/g/.


Content:

 

Product review: SNiFF+ for Linux

[Illustration]

Abstract:

SNiFF+ from takefive software is an Integrated Development Environment available for Linux. Takefive offers a download version free of charge at http://www.takefive.com/penguin. The software reviewed here came from a sample CD and seems identical with the download version. The restriction of both versions it that they are limited to 200 files. This is a review of SNiFF+ version 3.2. It has been tested under Redhat Linux 6.0.



 

What is SNiFF+ ?

SNiFF+ is an Integrated Development Environment for the Languages C, C++, Java, IDL, Fortran77, Fortran90 and ADA. SNiFF+ gives you the possibility to visually understand your code. Users of other big operating systems may already be used to such development environments and be very happy to see that such an IDE is available for Linux.

SNiFF+ and IDEs in general are best used with larger pieces of code and in environments where you have to make changes to existing code which you have not entirely written yourself. SNiFF+ supports also various version control tools such as RCS, CVS, clearcase, etc... This makes it probabaly ideal for teamwork in larger projects.

 

Installation

SNiFF+ for Linux comes with an installation script. This script takes you to a dialog mode. I had no problems using it. SNiFF+ is not available in a packages format such as rpm or deb but this is not a problem as SNiFF+ does not install across the entire file system. The script installs everything below just one directory (I used /opt/sniff) and it is therefore very easy to un-install later on. Below you see the start of the installation script with the different UNIX platforms for which SNiFF+ is available.


 
                    SNiFF+ 3.2 installation procedure
              Copyright (c) 1993-1999 TakeFive Software GmbH.
                             All rights reserved.
 
 Please select:
 
   [A]   Install SNiFF+ binaries
   [B]   Install GNU binaries
   [C]   Install FlexLM binaries
 
   [X]   Exit installation
 
 Your selection: a
 
 
 SNiFF+ can be installed for multiple platforms in one directory. It is also
 possible to install a SNiFF+ kit for a platform which is not the installation
 platform. Therefore, please select first the target platforms
 and then the installation platform.
 
 
 Enter the platform(s) for which you want to install SNiFF+:
 
 sunos       for Sun SPARC machines running SunOS4 (Solaris 1.x)
 solaris     for Sun SPARC machines running SunOS5 (Solaris 2.x)
 aix         for IBM Risc machines running AIX 4.x
 hpux        for HP 9000/7XX machines running HP-UX 10.x/11.x
 decalpha    for DEC/alpha machines running Digital UNIX 3.x/4.x
 irix        for SGI machines running IRIX 5.3 or later
 unixware    for PC's running SCO Unixware 7.x/2.x or OpenServer 5.x
 linux-glibc for PC's running Linux 2.x based on GNU glibc 2.1 (like RedHat 6.x)
 sinix       for SNI RM machines running Reliant Unix 5.4x
 
 Enter one name at a time (Leave empty to finish the selection).
 
 Target platform number 1 : linux-glibc
 Target platform number 2 :
 
 ....the script continues here with more questions.....

One thing that I fall over during installation was the dialog where one could install "Vim 5.0 Vi Improved by Bram Moolenar". I decided not to install Vim as I had it already on the disk. This turned out to be a mistake and I had to install it later on. The Vim version that comes with SNiFF+ is a special one. It has the ability to communicate with the other tools of the IDE. Therefore if you would like to use Vi, install this special Vim.

SNiFF+ can be installed into any location. Therefore you need to do 2 things after completion of the installation:

  1. set the environment variable SNIFF_DIR to the place where you installed SNiFF+ (/opt/sniff in my case).
  2. Extend the PATH to point to the bin-directory inside SNIFF_DIR (/opt/sniff/bin in my case).
Dependent on the shell used you must either edit /etc/profile, ~/.bashrc for bash or /etc/csh.cshrc, .tcshrc for tcsh or what ever rc file it is for your shell. If you don't want to edit the shell-rc files you can use this small wrapper script which I called startsniff:
#!/bin/sh
PATH="$PATH:/opt/sniff/bin"
export PATH
MANPATH="$MANPATH:/opt/sniff/man"
export MANPATH
SNIFF_DIR=/opt/sniff
export SNIFF_DIR
#start sniff now:
sniff

 

Documentation

tutorial in netscape

SNiFF+ comes with a very nice documentation system in html. There seems to be the possibility to print also the documentation from postscript files but I never felt that I needed this as the html documentation is good. When starting SNiFF+ with the command sniff you are first presented a welcome screen. This welcome screen gives you the possibility to go directly to programming language specific documentation. Selecting this item starts then netscape with the corresponding tutorial. I would recommend everyone to go at least quickly through the tutorial


 

Important components of SNiFF+


The Launcher launcher

A project is the main structuring element in SNiFF+ for grouping together files and directories. When starting sniff you are presented with the following small launcher window. From here you create new projects and you have an overview over the already existing ones. Here you normally begin your work by starting the project editor or the symbol browser.



The project editor launcher

In the project editor you see all the source files belonging to a project. You can filter on that list, include/exclude sub-directories etc. It shows also version control/locking information and you can checkin/checkout files. A very nice feature is that you can search in the list of file names by just typing the file name. The search function is incremental, searching while typing, similar to emacs isearch.



The symbol browser launcher

The symbol browser is similar to the project editor except that you see all symbols and where they are used. Via right mouse button click you can start the cross referencer (see below) and see where a symbol is referred to and which symbols refer to it. E.g which functions use this particular function or variable.



The class browser

The Class Browser shows the locally defined and inherited members of a class. It provides a range of filtering possibilities based on the inheritance, visibility and type of the members.



The hierarchy browser hierarchy

The Hierarchy Browser shows the inheritance relationships of classes.



The cross referencer crossref

Here you see in which places a given symbol (function, variable etc) is used and also to which symbols a given function or class refers to.



The include browser include

Here you see which files are included in a given .c file or where a .h file is used.



The source editor edit

Sniff comes with a nice source editor. It has syntax highlighting and you can quickly jump between functions/classes. You also can call other programs like e.g the cross referencer directly from inside the source editor.
The editor is very advanced however it does not have the power of vim or emacs. On the other side vim or emacs require that you know them by heart to really use them. The sniff source editor is therefore a very good choice if you are not 100% familiar with vim or emacs.

Those who do not want to use anything other than vim or emacs can also use these editors with SNiFF+. When you want to use vim then you should install the version that comes with SNiFF+. This special vim has some communication protocols compiled in which enables SNiFF+ to talk to vim. To use emacs you do not need to install anything special. The normal emacs that comes with most Linux distributions should work.



The sniff shell shell

The shell window is mainly used during a compile run. You can see the error messages from the compiler in that window. To jump to an error in the source code you highlight the line of the error message in the shell and then you select Edit->Show Error. This takes you in the source editor to the line where the error happened. This shell window is otherwise very simple. See also further down for a description of problems that I had with this shell window.



Other tools

SNiFF+ includes also a couple of other programs which I have not used yet. These are Documentation editor, DiffMerge and Configuration Manager. DiffMerge seems to be a merge tool to merge in changes from a branch and the Configuration Manager seems to be a program to create and manage branches.

   

The flip side

SNiFF+ has been ported to Linux and it is visible in many cases. Luckily it supports common short cuts such as Crtl-a (go to start of line), Crtl-e (go to end of line), Crtl-k (delete until end of line) etc... It does however not support copy and paste via mouse. Under Unix one has normally a 3 button mouse and you select text with the left mouse button while you paste it with the middle mouse button. Under Linux this works across all programs and it is really annoying that it does not work with SNiFF+. Instead copy and paste is done with a key combination that seems to come from MS-Windows.
SNiFF+ is otherwise a sound product but not being able to copy and paste with the mouse really annoyed me every time I used it. If I had to suggest a high priority improvement for SNiFF+ then it is this point.

I use colors in the shell prompt and I have aliased ls to ls --color=tty. Normal Linux xterm, gnome-term, kvt, etc do all support these colors:
shell
The shell that comes with sniff does not support it and the output looks then a bit funny:
shell
Fortunately it is not that difficult to fix although it would have been nice if sniff did support ANSI color codes. To fix it the easiest solution is to test for $TERM and if that is equal to etterm (the sniff terminal name) then unalias ls und do not use color in the prompt.
Long term emacs users probably know that the shell in emacs has the same problems and have already a work arround in their .bashrc or .tcshrc. Here is e.g some code for tcsh users to go into their .tcshrc:

if ($?TERM) then
     # switch off color prompt for emacs and sniff
     if ("$TERM" == "dumb" || "$TERM" == "etterm") then
         # a color free prompt:
         set prompt='\n%n@%m[%d,%T]\n(%~) %# '
         alias cwdcmd '/bin/ls -F'
         alias ls '/bin/ls -F'
     endif
endif
Users of bash may write:
# switch off color prompt for emacs and sniff
if [ "$TERM" = "etterm" -o "$TERM" = "dumb" ]; then
        PS1="[\u@\h \W]\\$ "
        alias ls="/bin/ls -F"
fi

Another problem of the sniff shell is the name of the terminal. etterm was at least not known in my /etc/termcap. This produces then the message 'etterm': unknown terminal type.

 

Conclusion

SNiFF+ 3.2 is a good product. It provides the visualization and comfort that one expects from and IDE. SNiFF+ ran also very stable under my Redhat 6.0. I had used it for about 3 weeks before I wrote this article. SNiFF+ did not crash once. The tools are made for daily use. With the exception of this really annoying copy/paste problem all parts of SNiFF+ were very well usable. Personally I can not understand that this software is available for so many Unix systems and does not get the simple copy/paste via mouse buttons right.

 

Talkback form for this article

Every article has its own talkback page. On this page you can submit a comment or look at comments from other readers:
 talkback page 

Webpages maintained by the LinuxFocus Editor team
© Guido Socher, FDL
LinuxFocus.org

Click here to report a fault or send a comment to LinuxFocus

2001-06-06, generated by lfparser version 2.15