.CM  SCRIPT , Version - 1.1 , last edited by holger
.ad 8
.bm 8
.fm 4
.bt $Copyright (c) 1996-2004 SAP AG$$Page %$
.tm 12
.hm 6
.hs 3
.TT 1 $SQL$Project Distributed Database System$VIN16$
.tt 2 $$$
.TT 3 $$command-line-history$1995-11-01$
***********************************************************
.nf

.nf


    ========== licence begin  GPL
    Copyright (c) 1996-2004 SAP AG

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    ========== licence end

.fo


.fo
.nf
.sp
MODULE  : command-line-history
=========
.sp
Purpose : Routines for store and restore the history
          of command line.
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :
 
        PROCEDURE
              i16getcmd(VAR cmnd         : tin_cmd_type;
                    VAR ok           : boolean);
 
        PROCEDURE
              i16putcmd(VAR cmnd         : tin_cmd_type);
 
        FUNCTION
              in1630 : tsp00_Int4;
 
.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :
 
        FROM
              global_variable : VIN01;
 
        VAR
              i01g   : tin_global_in_vars;
 
      ------------------------------ 
 
        FROM
              standard_editor_functions : VIN14;
 
        PROCEDURE
              i14deleteeline (VAR eform  : tin_cmd_pool;
                    VAR evars        : tin_eform_vars;
                    line_nr          : tin_natural;
                    line_count       : tin_natural);
 
        PROCEDURE
              i14geteline (VAR eform     : tin_cmd_pool;
                    VAR evars     : tin_eform_vars;
                    VAR line      : tin_screenline;
                    line_nr       : tin_natural;
                    VAR length    : tin_natural;
                    VAR error     : boolean);
 
        PROCEDURE
              i14puteline (VAR eform     : tin_cmd_pool;
                    VAR evars     : tin_eform_vars;
                    VAR line      : tin_screenline;
                    line_nr       : tin_natural;
                    length        : tin_natural;
                    VAR error     : boolean);
 
.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :
 
        PROCEDURE
              i14geteline;
 
              tin_eform_buffer tin_cmd_pool
              tin_eline        tin_screenline
 
        PROCEDURE
              i14puteline;
 
              tin_eform_buffer tin_cmd_pool
              tin_eline        tin_screenline
 
        PROCEDURE
              i14deleteeline;
 
              tin_eform_buffer tin_cmd_pool
 
.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  : 
.sp
.cp 3
Created : 1988-08-22
.sp
.cp 3
Version : 1996-12-04
.sp
.cp 3
Release :  6.1.2     Date : 1995-11-01
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
 
.cp 12;.nf
.CM *-END-* specification -------------------------------
.sp 2
.CM hier input description
.cp 12;.nf
.CM hier ende description
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:
 
.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
 
 
(*------------------------------*) 
 
FUNCTION
      in1630 : tsp00_Int4;
 
BEGIN
(* linkcheck function *)
in1630 := 219010614;
END;
 
(*------------------------------*) 
 
PROCEDURE
      i16getcmd(VAR cmnd         : tin_cmd_type;
            VAR ok           : boolean);
 
VAR
      error       : boolean;
 
BEGIN
WITH i01g^.com_stack, cmnd DO
    BEGIN
    ok := cvars.lines > 0;
    IF  ok
    THEN
        BEGIN
        IF  cp > 1
        THEN
            cp := cp - 1
        ELSE
            cp := cvars.lines;
        (*ENDIF*) 
        i14geteline(cbuf,cvars,content,cp,length,error);
        END;
    (*ENDIF*) 
    END;
(*ENDWITH*) 
END;(* i16getcmd *)
 
(*------------------------------*) 
 
PROCEDURE
      i16putcmd(VAR cmnd : tin_cmd_type);
 
VAR
      error   : boolean;
 
BEGIN
WITH i01g^.com_stack, cmnd DO
    BEGIN
    cp := cvars.lines + 1;
    error := true;
    WHILE error DO
        BEGIN
        i14puteline(cbuf,cvars,content,cp,length,error);
        IF  error
        THEN
            i14deleteeline(cbuf,cvars,1,1);
        (*ENDIF*) 
        cp := cvars.lines + 1;
        END;
    (*ENDWHILE*) 
    END;
(*ENDWITH*) 
END; (* i16putcmd *)
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
*-PRETTY-*  statements    :         16
*-PRETTY-*  lines of code :         65        PRETTY  3.09 
*-PRETTY-*  lines in file :        209         1992-11-23 
.PA 
