Un-ignored: the dev drive is the ground truth the restoration and emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio content). Kept in-repo for the pod-owner community. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
56 lines
2.6 KiB
Plaintext
56 lines
2.6 KiB
Plaintext
/****************************************************************************
|
|
** PROJECT ** PACK **
|
|
*****************************************************************************
|
|
** FUNCTION ** THIS (VERY) BRIEF MACRO REMOVES ALL REDUNDANT SPACE FROM A **
|
|
** ** FILE. I.E. SPACES/TABS ON THE END OF LINES **
|
|
*****************************************************************************
|
|
** AUTHOR ** WARREN D HUMPHREYS **
|
|
*****************************************************************************
|
|
** DATE ** TUESDAY 16TH JULY 1991 **
|
|
*****************************************************************************
|
|
** COMMENTS ** **
|
|
*****************************************************************************
|
|
** MODIFICATION HISTORY **
|
|
*****************************************************************************
|
|
** DATE ** WHO ** CHANGED WHAT **
|
|
*****************************************************************************
|
|
** ** ** **
|
|
****************************************************************************/
|
|
|
|
/****************************************************************************
|
|
** FUNCTION PROTOTYPES **
|
|
****************************************************************************/
|
|
|
|
int Pack(void);
|
|
|
|
/****************************************************************************
|
|
** GLOBAL VARIABLES **
|
|
****************************************************************************/
|
|
|
|
/****************************************************************************
|
|
** ACTUAL FUNCTIONS **
|
|
****************************************************************************/
|
|
|
|
int Pack()
|
|
{
|
|
int Count;
|
|
string Reply;
|
|
|
|
get_parm(NULL,Reply,"Remove all redundant space from file [Y|N]? ",1,
|
|
"N");
|
|
if (upper(Reply)=="Y")
|
|
{
|
|
save_position();
|
|
top_of_buffer();
|
|
message("Removing redundant space from file...");
|
|
Count=translate("{[ \t]+>}","",1,1,0,0,1);
|
|
restore_position();
|
|
|
|
if (Count==0)
|
|
message("No redundant space found");
|
|
else
|
|
message("%d occurence%s of redundant space %s removed",Count,
|
|
(Count==1) ? "" : "s",(Count==1) ? "was" : "were");
|
|
}
|
|
}
|