[BACK]Return to t0.cc CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / try

File: [local] / OpenXM / src / k097 / try / t0.cc (download)

Revision 1.1.1.1 (vendor branch), Fri Oct 8 02:12:15 1999 UTC (24 years, 7 months ago) by maekawa
Branch: OpenXM, MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_20000124, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, RELEASE_1_1_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9, ALPHA
Changes since 1.1: +0 -0 lines

o import OpenXM sources

#include <iostream.h>
#include <stdio.h>

extern "C" {
void GC_init(void);
void KSstart(void);
int KSexecuteString(char *s);
char *KSstringPop(void);
}
    
main() {
  char a[256];
  char *s;
  int result;
  GC_init();
  KSstart();

  while (1) {
    cout << "\n\n?";
    cin.getline(a,256);
    result = KSexecuteString(a);
    if (result != -1) {
      // If an error did not occured, pop the top
      //  element from the stack of kan/sm1
      KSexecuteString("  toString ");
      s = KSstringPop();
      if (s != (char *)NULL) {
	cout << s << "\n";
      }
    }
  }
}