home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 1.ddi / EXAMPLE.EXE / CSCAPE / EXAMPLE / DEMOFLOD.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-12  |  1.1 KB  |  67 lines

  1. /*
  2.     demoflod.c
  3.  
  4.     jmd 6/89
  5.  
  6.     Copyright (c) 1989, by Oakland Group, Inc.
  7.     ALL RIGHTS RESERVED.
  8.  
  9.     This program demonstrates loading a sed from a screen file.
  10.  
  11.     It loads the sed named "test" from the screen file "test.lnf"
  12.  
  13.     You must generate this file with the DEMOFSAV example program
  14.     before using this.
  15. */
  16.  
  17. #include <stdio.h>
  18. #include <cscape.h>
  19. #include <sfile.h>
  20.  
  21. /* function symbol table */
  22.  
  23. fsyminit_struct my_list[] = {
  24.  
  25. {FSYM_CLASS},
  26. {"sedwin_Class",    (VOID_FPTR)    sedwin_Class    ,  NULL },
  27.  
  28. {FSYM_FIELDFUNCS },
  29. {"string_funcs", FNULL, (VOID *) &string_funcs},
  30.  
  31. {FSYM_USER },
  32.  
  33. {FSYM_BORDER },
  34. {"bd_box", (VOID_FPTR) bd_box, NULL},
  35.  
  36. {FSYM_MOUSE },
  37. {FSYM_MOVEMETHOD },
  38. {FSYM_EXPLODE },
  39. {FSYM_SPECIAL },
  40. {FSYM_AUX },
  41. {FSYM_LISTEND}
  42. };
  43.  
  44. void main()
  45. {
  46.     sed_type sed;
  47.     sfile_type sfile;
  48.  
  49.     /* Initialize the display */
  50.     disp_Init(def_ModeText, NULL);
  51.  
  52.     sfile = sfile_Open("test.lnf", my_list);
  53.  
  54.     /* Load the sed */
  55.     sed = sfile_LoadSed(sfile, "test", SED_ALLOC);
  56.  
  57.     if (sed != NULL) {
  58.         sed_Repaint(sed);
  59.         sed_Go(sed);
  60.         sed_Close(sed);
  61.     }
  62.  
  63.     sfile_Close(sfile);
  64.     disp_Close();
  65. }
  66.  
  67.