Make your own free website on Tripod.com

    palm-annotate

    Creates a file of annotated function prototypes for PalmOS prc-tools.

Description

This tiny Perl scipt can save hours for prc-tools programmers  especially  for  a  multi-segment project build with multigen.

While current multigen technique requires explicit section specification  in prototype for each function that doesn't belong to the default segment,  palm-annotate  takes  over this  routine  work:  you just specify section and list of source (.c or .cpp) files and the header file  is  created for you.

You  might find palm-annotate useful even for a single-segment project as a convenient tool for generating  headers.

Example:

All  functions  from file s1a.c and s1b.c should be placed  in section "SECT1", while files s2a.c and s2b.c go to section "SECT2".
You  have  a  header file "sections.h" which defines SECT1  and SECT2:
            #define SECT1 __attribute__((section("SECT1")))
           #define SECT2 __attribute__((section("SECT2")))
 
File s1a.c starts with the following
 
#include <PalmOS.h>
#include "sections.h"

// The following header is generated by palm-annotate
#include "gproto.h" // Global prototypes

/* ... Local type definitions ... */

// The following header is generated by palm-annotate
#include "s1a_local.h"   // Local prototypes

For other files you replace s1a_local.h with an  appropriate header ( s1b_local.h, s2a_local.h, etc.)

The following shell commands generate the header files:

palm-annotate -a SECT1 -o gproto.h s1*.c
palm-annotate -pS -a SECT1 -o s1a_local.h s1a.c
palm-annotate -pS -a SECT1 -o s1b_local.h s1b.c

palm-annotate -a SECT2 -A -o gproto.h s2*.c
palm-annotate -pS -a SECT2 -o s2a_local.h s2a.c
palm-annotate -pS -a SECT2 -o s2b_local.h s2b.c
 
 

Requirements:

Perl5, cproto

cproto is available from

     http://sourceforge.net/projects/cproto/

The rpm cproto package comes with all recent RadHat Linux distributions.
 
 

 

Download

Tarball:  palm-annotate-1.0.0.tar.gz
RPM source:  palm-annotate-1.0.0-1.i386.rpm
RPM precompiled:  palm-annotate-1.0.0-1.i386.rpm


Maintained by  Michael Glickman