Example #1
0
static Tprocess
arg_process (int argument_number)
{
  Tprocess process = (arg_ulong_integer (argument_number));
  if (!OS_process_valid_p (process))
    error_bad_range_arg (argument_number);
  return (process);
}
Example #2
0
Tchannel
arg_channel (int arg_number)
{
  Tchannel channel = (arg_to_channel ((ARG_REF (arg_number)), arg_number));
  if (!OS_channel_open_p (channel))
    error_bad_range_arg (arg_number);
  return (channel);
}
Example #3
0
static void *
arg_host (unsigned int arg)
{
  CHECK_ARG (arg, STRING_P);
  if ((STRING_LENGTH (ARG_REF (arg))) != (OS_host_address_length ()))
    error_bad_range_arg (arg);
  return (STRING_POINTER (ARG_REF (arg)));
}
Example #4
0
static Tchannel
arg_server_socket (unsigned int arg)
{
  Tchannel server_socket = (arg_nonnegative_integer (arg));
  if ((OS_channel_type (server_socket)) != channel_type_tcp_server_socket)
    error_bad_range_arg (arg);
  return (server_socket);
}
Example #5
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);
}
Example #6
0
static fexcept_t *
arg_fexcept (int n)
{
  SCHEME_OBJECT flags = (arg_vector_8b (n));
  if ((sizeof (fexcept_t)) != (VECTOR_8B_LENGTH (flags)))
    error_bad_range_arg (n);
  return ((fexcept_t *) (VECTOR_8B_POINTER (flags)));
}
Example #7
0
static fenv_t *
arg_fenv (int n)
{
  SCHEME_OBJECT environment = (arg_vector_8b (n));
  if ((sizeof (fenv_t)) != (VECTOR_8B_LENGTH (environment)))
    error_bad_range_arg (n);
  return ((fenv_t *) (VECTOR_8B_POINTER (environment)));
}
Example #8
0
static size_t
arg_context_index (unsigned int arg)
{
  unsigned long n = (arg_ulong_index_integer (arg, context_table_length));
  if (((context_table[n]) . context) == 0)
    error_bad_range_arg (arg);
  return (n);
}
Example #9
0
static void *
allocation_item_arg (unsigned int arg, struct allocation_table * table)
{
  unsigned int index = (arg_ulong_index_integer (arg, (table -> length)));
  void * item = ((table -> items) [index]);
  if (item == 0)
    error_bad_range_arg (arg);
  return (item);
}
Example #10
0
static Tchannel
arg_client_socket (unsigned int arg)
{
  Tchannel socket = (arg_ulong_integer (arg));
  if (! (((OS_channel_type (socket)) == channel_type_tcp_stream_socket)
	 || ((OS_channel_type (socket)) == channel_type_unix_stream_socket)))
    error_bad_range_arg (arg);
  return (socket);
}
Example #11
0
long
arg_ascii_char (int n)
{
  CHECK_ARG (n, CHARACTER_P);
  {
    SCHEME_OBJECT object = (ARG_REF (n));
    if (! (CHAR_TO_ASCII_P (object)))
      error_bad_range_arg (n);
    return (CHAR_TO_ASCII (object));
  }
}