// Copyright, 2001-2003, Astra Network Inc.  All Rights Reserved

// This source code has been published by Astra Network Inc. However, any
// use, reproduction, modification, distribution or transfer of this
// software, or any software which includes or is based upon any of this
// code, is only permitted if expressly authorized by a written license
// agreement from Astra. Contact your Astra representative directly for
// more information.

#include "quad.h"

/*
 * Assign a long (or an int) to a quad. Pad the highorder bits with zero.
 * FIXME NOW!! These won't work for signed ints.
 */
___quad_t
quad_ltoq (a)
     long a;
{
  union uu aa;
  aa.ul[L] = a;

  if (a < 0)
    aa.ul[H] = 0xFFFFFFFFl;
  else
    aa.ul[H] = 0l;

  return (aa.q);
}
