/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/
/* edling APL2 V1.0.0 **************************************************
* Edling is called by edline and gettcom to delete a character in the *
* line being edited, shifting all characters to the right left one *
* position, and repositioning the cursor to the character following *
* the deleted one. *
***********************************************************************/
#define INCLUDES STDIO+STRING
#include "includes.h"
void edling(line,pcursor,bs,linelen)
char line[]; /* Line to be edited. */
int *pcursor; /* Offset relative 0 to character to be deleted. */
int bs; /* Amount to backspace cursor before reprinting. */
int linelen; /* Length of line. */
{
Aplprint; Aplputch; Edlinf;
int tcursor;
strcpy(line+(*pcursor)-1,line+*pcursor); /* shift left */
if (bs)
edlinf(line,pcursor,bs); /* backspace */
aplprint(line+*pcursor); /* print over */
aplputch(' ');
tcursor = *pcursor;
edlinf(line,&tcursor,linelen - (*pcursor) + 1); /* back cursor */
}