~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to routines/console/history.h

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _SCI_HISTORY 
 
2
#define _SCI_HISTORY 
 
3
 
 
4
/* Allan CORNET 2004 */
 
5
/* Scilab INRIA */
 
6
 
 
7
#include <stdio.h>
 
8
#include <string.h>
 
9
#include <time.h>
 
10
#include <stdlib.h>
 
11
 
 
12
#ifndef WIN32
 
13
#include "../stack-c.h"
 
14
#endif
 
15
 
 
16
#ifndef STRICT
 
17
  #define STRICT
 
18
#endif
 
19
 
 
20
#ifdef  WIN32
 
21
  #include "../wsci/wcommon.h" /* for BOOL */
 
22
#else
 
23
  typedef int BOOL;
 
24
  extern char *getenv();
 
25
#endif
 
26
 
 
27
#ifndef TRUE
 
28
#define TRUE 1
 
29
#endif
 
30
#ifndef FALSE
 
31
#define FALSE 0
 
32
#endif
 
33
 
 
34
extern void write_scilab  __PARAMS((char *s));
 
35
/*-----------------------------------------------------------------------------------*/
 
36
#define MAXBUF  1024
 
37
/*-----------------------------------------------------------------------------------*/
 
38
typedef struct hist_
 
39
{
 
40
  char *line;
 
41
  struct hist_ *prev;
 
42
  struct hist_ *next;
 
43
} sci_hist;
 
44
 
 
45
/*-----------------------------------------------------------------------------------*/
 
46
extern sci_hist *history ;      /* no history yet */
 
47
extern sci_hist *cur_entry;
 
48
/* Use for SearchInHistory --> ! */
 
49
extern sci_hist *research_knot_last;
 
50
extern BOOL NewSearchInHistory; /* rlgets wsci\command.c */
 
51
/*-----------------------------------------------------------------------------------*/
 
52
char *ASCIItime(const struct tm *timeptr);
 
53
void GetCommentDateSession(char *line,int BeginSession);
 
54
void AddHistory (char *line);
 
55
sci_hist * SearchBackwardInHistory(char *line); /* Effectue la recherche via ! dans l'historique*/
 
56
sci_hist * SearchForwardInHistory(char *line); /* Effectue la recherche via ! dans l'historique*/
 
57
/*-----------------------------------------------------------------------------------*/
 
58
sci_hist * GoFirstKnot(sci_hist * CurrentKnot);
 
59
sci_hist * GoLastKnot(sci_hist * CurrentKnot);
 
60
sci_hist * GoPrevKnot(sci_hist * CurrentKnot);
 
61
sci_hist * GoNextKnot(sci_hist * CurrentKnot);
 
62
 
 
63
/*-----------------------------------------------------------------------------------*/
 
64
int C2F(resethistory) _PARAMS((char *fname));
 
65
void reset_history(void);
 
66
int C2F(loadhistory) _PARAMS((char *fname));
 
67
int C2F(savehistory) _PARAMS((char *fname));
 
68
int C2F(gethistory) _PARAMS((char *fname)); /* Affiche le contenu de l'historique */
 
69
int CreSmatFromHist(char *fname, int number, sci_hist *Parcours);
 
70
/*-----------------------------------------------------------------------------------*/
 
71
 
 
72
#endif