home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / lib / mathlib / libblas / ludec / init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.2 KB  |  83 lines

  1. /* *****************************************************************************
  2. *
  3. * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  4. * All Rights Reserved.
  5. *
  6. * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  7. * the contents of this file may not be disclosed to third parties, copied or
  8. * duplicated in any form, in whole or in part, without the prior written
  9. * permission of Silicon Graphics, Inc.
  10. *
  11. * RESTRICTED RIGHTS LEGEND:
  12. * Use, duplication or disclosure by the Government is subject to restrictions
  13. * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  14. * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  15. * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  16. * rights reserved under the Copyright Laws of the United States.
  17. *
  18. ***************************************************************************** */
  19. #include "fast.h"
  20. #include "event.h"
  21. #include "device.h"
  22.  
  23. extern void do_quit(), do_rightmouse(), do_resize(), display(), ShowFast();
  24. extern void this_run(), that_run(), this_quit();
  25. extern void size300(), size500();
  26. extern void set1proc(), setnproc();
  27.  
  28.  
  29. int mainmenu, quitmenu, sizemenu, procmenu;
  30.  
  31. extern int max_size, max_proc;
  32.  
  33. Init(name)
  34. char *name;
  35. {
  36.     max_size = 300;
  37.     keepaspect(1, 1);
  38.     prefsize(600,600);
  39.     {
  40.         char *t, *strrchr();
  41.         winopen((t=strrchr(name, '/')) != NULL ? t+1 : name);
  42.     }
  43.  
  44.     wintitle("LAPACK-LINPACK");
  45.  
  46.     add_event(ANY, REDRAW, ANY, display, NULL);
  47.     qdevice(REDRAW);
  48.     
  49.     add_event(ANY, ESCKEY, UP, do_quit, NULL);
  50.     qdevice(ESCKEY);
  51.  
  52.     add_event(ANY, WINQUIT, ANY, do_quit, NULL);
  53.     qdevice(WINQUIT);
  54.     
  55.     add_event(ANY, RIGHTMOUSE, DOWN, do_rightmouse, NULL);
  56.     qdevice(RIGHTMOUSE);
  57.  
  58.     doublebuffer();
  59.     gconfig();
  60.  
  61.     shademodel(FLAT);
  62.  
  63.     CreateMenus();
  64.  
  65.     do_resize();
  66. }
  67.  
  68.     char str[64];
  69. CreateMenus() {
  70. /*    
  71.     sprintf(str, "N Procs %%t | 1 %%f | %d %%f", max_proc);
  72.     procmenu = defpup(str, set1proc, setnproc);
  73. */
  74.     sizemenu = defpup(" Size %t| 300 %f| 500 %f",
  75.             size300, size500);
  76.  
  77.     mainmenu = defpup("LAPACK-LINPACK %t|Reset %f|Size %m|------|Run LINPACK %f|Run LAPACK %f|------|Quit %f",
  78.         do_resize,sizemenu, this_run , that_run, this_quit);
  79.  
  80.     quitmenu = defpup("Quit %t|Really %f|Cancel %f",
  81.             do_quit, ShowFast);
  82. }
  83.