home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum16.lzh
/
SOFTWARE
/
C
/
DEVPRC
/
getsys.a
< prev
next >
Wrap
Text File
|
1990-03-24
|
4KB
|
96 lines
*-----------------------------------------------------------------------*
* *
* This software is copyrighted (c)1990 by Hellmuth Michaelis *
* *
* Permission is granted to reproduce and distribute *
* this package by any means as long as no fee is charged *
* and as long as this notice is always included in the copies. *
* Commerical use or incorporation into commercial software *
* is prohibited without the written permission of the *
* author. *
* *
* Other rights are reserved except as explicitly granted *
* by written permission of the author. *
* *
* Hellmuth Michaelis *
* Eggerstedtstr.28 *
* 2000 Hamburg 50 *
* Tel: +49 40 384298 *
* uucp(subnet): helle@ktshh *
* *
* I would like to thank Martin Gasthuber (martin@odinhh) and *
* Heino Peters (heino@hphal) for their suggestions and helpful *
* support ! *
* *
* CAUTION: *
* ======== *
* This functions are using an undocumented *
* OS-9 system call "I$SGetSt". its behaviour *
* is exactly like "I$GetStt" except that a *
* SYSTEM PATH NUMBER must be supplied ! *
* *
* This software is supplied "as is" ! No warranty of any kind *
* nor support is implied by making it avaiable to the public! *
* *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* _gs_sopt(): return option section of a device supplying *
* a system path number *
* *
* _gs_sdevn(): return the name of a device supplying a system *
* path number *
* *
* see also: _gs_devn() and _gs_opt() calls in the *
* OS-9 C Compiler Users Manual *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* *
* Ed Date Description by *
* -- -------- ------------------------------------------------- ------- *
* 01 14-01-90 first release -hm *
* *
*-----------------------------------------------------------------------*
Edition set 1
*-----------------------------------------------------------------------------
*
* _gs_sopt() get path options of system path number
*
* call:
* int _gs_sopt(path,buffer)
* int path; /* SYSTEM path number */
* struct sgbuf *buffer; /* buffer for option structure */
*
*-----------------------------------------------------------------------------
psect getsys,0,0,Edition,16,0
_gs_sopt: move.l a0,-(a7) save a0
movea.l d1,a0 buffer pointer
move.w #SS_Opt,d1 function code
_gs_scall os9 I$SGetSt get system path no option section
bcc.s _gs_sexit no error, jmp
move.l #-1,d0 return value
move.l d1,errno(a6) set errno global variable
_gs_sexit move.l (a7)+,a0 restore a0
rts back to caller
*-----------------------------------------------------------------------------
*
* _gs_sdevn() get device name of a system path number
*
* call:
* int _gs_sdevn(spath,buffer)
* int spath; /* SYSTEM path number */
* char *buffer; /* 32 byte buffer for device name */
*
*-----------------------------------------------------------------------------
_gs_sdevn: move.l a0,-(a7) save a0
movea.l d1,a0 buffer pointer
move.w #SS_DevNm,d1 function code
bra.s _gs_scall share code
ends
*------------------------ END OF FILE ----------------------------------------