home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / dos / allocdosobject.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  2.0 KB  |  89 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: allocdosobject.c,v 1.6 1997/01/27 00:36:14 ldp Exp $
  4.     $Log: allocdosobject.c,v $
  5.     Revision 1.6  1997/01/27 00:36:14  ldp
  6.     Polish
  7.  
  8.     Revision 1.5  1996/12/09 13:53:20  aros
  9.     Added empty templates for all missing functions
  10.  
  11.     Moved #include's into first column
  12.  
  13.     Revision 1.4  1996/10/24 15:50:23  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.3  1996/08/13 13:52:44  digulla
  17.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  18.     Replaced AROS_LA by AROS_LHA
  19.  
  20.     Revision 1.2  1996/08/01 17:40:47  digulla
  21.     Added standard header for all files
  22.  
  23.     Desc:
  24.     Lang: english
  25. */
  26. #include <exec/memory.h>
  27. #include <proto/exec.h>
  28. #include <dos/exall.h>
  29. #include <utility/tagitem.h>
  30. #include "dos_intern.h"
  31.  
  32. /*****************************************************************************
  33.  
  34.     NAME */
  35. #include <proto/dos.h>
  36.  
  37.     AROS_LH2(APTR, AllocDosObject,
  38.  
  39. /*  SYNOPSIS */
  40.     AROS_LHA(ULONG,            type, D1),
  41.     AROS_LHA(struct TagItem *, tags, D2),
  42.  
  43. /*  LOCATION */
  44.     struct DosLibrary *, DOSBase, 38, Dos)
  45.  
  46. /*  FUNCTION
  47.     Creates a new dos object of a given type.
  48.  
  49.     INPUTS
  50.     type - object type.
  51.     tags - Pointer to taglist array with additional information.
  52.  
  53.     RESULT
  54.     Pointer to new object or NULL.
  55.  
  56.     NOTES
  57.  
  58.     EXAMPLE
  59.  
  60.     BUGS
  61.  
  62.     SEE ALSO
  63.  
  64.     INTERNALS
  65.  
  66.     HISTORY
  67.     29-10-95    digulla automatically created from
  68.                 dos_lib.fd and clib/dos_protos.h
  69.  
  70. *****************************************************************************/
  71. {
  72.     AROS_LIBFUNC_INIT
  73.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  74.  
  75.     switch(type)
  76.     {
  77.     case DOS_FILEHANDLE:
  78.         return AllocMem(sizeof(struct FileHandle),MEMF_CLEAR);
  79.     case DOS_FIB:
  80.         return AllocMem(sizeof(struct FileInfoBlock),MEMF_CLEAR);
  81.     case DOS_EXALLCONTROL:
  82.         return AllocMem(sizeof(struct ExAllControl),MEMF_CLEAR);
  83.     case DOS_CLI:
  84.         return AllocMem(sizeof(struct CommandLineInterface),MEMF_CLEAR);
  85.     }
  86.     return NULL;
  87.     AROS_LIBFUNC_EXIT
  88. } /* AllocDosObject */
  89.