Ejemplo n.º 1
0
static Tchannel
arg_pty_master (unsigned int arg)
{
  Tchannel channel = (arg_channel (1));
  if ((OS_channel_type (channel)) != channel_type_unix_pty_master)
    error_bad_range_arg (1);
  return (channel);
}
Ejemplo n.º 2
0
#include "syscall.h"
#include "ntproc.h"
#include "ostty.h"

extern HANDLE master_tty_window;
extern Tchannel arg_to_channel (SCHEME_OBJECT, int);

static Tchannel * object_to_channel_vector
  (SCHEME_OBJECT, int, unsigned long *, long *);
static long wait_for_multiple_objects (unsigned long, Tchannel *, long, int);
static long wait_for_multiple_objects_1 (unsigned long, Tchannel *, long, int);

DEFINE_PRIMITIVE ("CHANNEL-DESCRIPTOR", Prim_channel_descriptor, 1, 1, 0)
{
  PRIMITIVE_HEADER (1);
  PRIMITIVE_RETURN (ulong_to_integer (arg_channel (1)));
}

DEFINE_PRIMITIVE ("WIN32-GUI-TRACE", Prim_win32_gui_trace, 2, 2, 0)
{
  PRIMITIVE_HEADER (2);
  {
    win32_trace_level = (arg_ulong_integer (1));
    if (win32_trace_file != 0)
      {
	fflush (win32_trace_file);
	fclose (win32_trace_file);
	win32_trace_file = 0;
      }
    if (win32_trace_level > 0)
      win32_trace_file
Ejemplo n.º 3
0
#include "scheme.h"
#include "prims.h"
#include "osio.h"
#include "ux.h"
#include "uxproc.h"

extern int UX_channel_descriptor (Tchannel channel);

static const char ** string_vector_arg (int arg);
static int string_vector_p (SCHEME_OBJECT vector);
static const char ** convert_string_vector (SCHEME_OBJECT vector);

DEFINE_PRIMITIVE ("CHANNEL-DESCRIPTOR", Prim_channel_descriptor, 1, 1, 0)
{
  PRIMITIVE_HEADER (1);
  PRIMITIVE_RETURN (long_to_integer (UX_channel_descriptor (arg_channel (1))));
}

#define PROCESS_CHANNEL_ARG(arg, type, channel)				\
{									\
  if ((ARG_REF (arg)) == SHARP_F)					\
    (type) = process_channel_type_none;					\
  else if ((ARG_REF (arg)) == (LONG_TO_FIXNUM (-1)))			\
    (type) = process_channel_type_inherit;				\
  else if ((ARG_REF (arg)) == (LONG_TO_FIXNUM (-2)))			\
    {									\
      if (ctty_type != process_ctty_type_explicit)			\
	error_bad_range_arg (arg);					\
      (type) = process_channel_type_ctty;				\
    }									\
  else									\