home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
CSSRC
/
SDDELROW.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-28
|
1KB
|
46 lines
/*
sddelrow.c 4/10/88
% sed_DeleteRows
C-scape 3.2
Copyright (c) 1988, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
3/24/89 jmd added sed_ macros
7/15/89 jdc added currfield stuff
3/28/90 jmd ansi-fied
*/
#include "sed.h"
void sed_DeleteRows(sed_type sed, int row, int count)
/*
Deletes count rows in the sed starting with row.
*/
{
menu_type menu;
menu = sed_GetMenu(sed);
menu_DeleteRows(menu, row, count);
/* adjust fieldno and fieldpos */
if (menu_GetFieldCount(menu) > 0) {
if (sed_GetFieldNo(sed) >= menu_GetFieldCount(menu)) {
sed_SetFieldNo(sed, menu_GetFieldCount(menu) - 1);
sed_SetRecordPos(sed, menu_GetFirstFieldPos(menu, sed_GetFieldNo(sed)));
}
/* reset the current field pointer */
sed_SetCurrField(sed, menu_GetField(menu, sed_GetFieldNo(sed)));
}
else {
sed_SetFieldNo(sed, -1);
sed_SetRecordPos(sed, NO_WRITEABLES);
sed_SetCurrField(sed, NULL);
}
}