I have been playing a little with the scripts we use to modify the code 
output by fdesign. I have used "sort" to create a minimal list of the 
functions called by the .C file:

EXTERN_FUNCS=extern.tmp
sed -n 's/extern void \(.*\)/extern "C" void \1/p' ${HIN} > ${EXTERN_FUNCS}

if [ -s ${EXTERN_FUNCS} ]; then
        sort -u ${EXTERN_FUNCS} > tmp
        mv -f tmp ${EXTERN_FUNCS}
fi

My question: is "sort -u" standard, or should I pipe the results of "sort" to 
"uniq"?

Regards,
Angus

ps, FWIW, the header files now look like

#ifndef FD_preferences_h_
#define FD_preferences_h_

#include "forms_fwd.h"

extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);

struct FD_preferences {

Rather than:

#ifndef FD_preferences_h_
#define FD_preferences_h_

#include "forms_fwd.h"
extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);

struct FD_preferences {

Reply via email to