home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / starbasx.c < prev    next >
C/C++ Source or Header  |  1999-01-02  |  1KB  |  44 lines

  1. /* -*-C-*-
  2.  
  3. $Id: starbasx.c,v 1.6 1999/01/02 06:11:34 cph Exp $
  4.  
  5. Copyright (c) 1989, 1990, 1999 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21.  
  22. /* Starbase/X11 interface */
  23.  
  24. #include "scheme.h"
  25. #include "prims.h"
  26. #include "x11.h"
  27. #include <starbase.c.h>
  28.  
  29. DEFINE_PRIMITIVE ("X11-WINDOW-STARBASE-FILENAME", Prim_x11_window_starbase_filename, 1, 1,
  30.   "Given a window, returns the name of a file which can be opened\n\
  31. as a Starbase graphics device.")
  32. {
  33.   PRIMITIVE_HEADER (1);
  34.   {
  35.     struct xwindow * xw = (x_window_arg (1));
  36.     char * starbase_filename =
  37.       (make_X11_gopen_string ((XW_DISPLAY (xw)), (XW_WINDOW (xw))));
  38.     PRIMITIVE_RETURN
  39.       ((starbase_filename == 0)
  40.        ? SHARP_F
  41.        : (char_pointer_to_string (starbase_filename)));
  42.   }
  43. }
  44.