/****************************************************/ /* This a very simple example of an E! API program */ /* changing the current text line for a new one */ /****************************************************/ /******************************************************************************/ /* PLEASE COMPILE WITH TURBO C -ml LARGE MODEL OPTION */ /* run from the E! command line : @example */ /******************************************************************************/ #include "api.h" #include char far *editbufferptr; char exstring[] = "Here I am. I replaced the original text line!"; void main () { editbufferptr = (char far *) Request_E_Address(EDITBUFF_REQUEST); /* Retrieve Editbuffer address */ editbufferptr[0] = strlen(exstring); /* It's a PASCAL string - set first byte to exstring length */ strcpy(editbufferptr + 1, (char far *) exstring); /* Load string after first byte */ Request_E_Service(STORE_SERVICE); /* Store it */ Request_E_Service(DISPLINE_SERVICE); /* Display it */ Request_E_Service(CHANGE_SERVICE); /* Notify the change */ }