{************************************************************************
*									*
*  News_Scan: Accept a newsgroup name from the command line and check	*
*  to see if there is unread news in the group.				*
*									*
*.......................................................................*
*									*
*  Written in VAX Pascal for VAX/VMS machines.				*
*									*
*  Author:  Jonathan Ridler,						*
*	    University Computing Services,				*
*	    University of Melbourne.					*
*									*
*  Created: March, 1988.						*
*									*
************************************************************************}

[INHERIT ('SYS$LIBRARY:STARLET')]

PROGRAM News_Scan (OUTPUT) ;

CONST

Subjlen = 50 ;		{ Max Length of newsgroup name in NEWSDEFINE.H }

TYPE

$UWORD = [BYTE(2)] 0..65535 ;

VAR

Newsgroup : VARYING [Subjlen] OF CHAR := ZERO ;


[ASYNCHRONOUS] FUNCTION LIB$GET_FOREIGN (
	%DESCR Get_Str : VARYING [$L1] OF CHAR ;
	User_Prompt :
		[CLASS_S] PACKED ARRAY [$L2..$U2:INTEGER] OF CHAR := %IMMED 0 ;
	VAR Out_Len : [VOLATILE] $UWORD := %IMMED 0 ;
	VAR Force_Prompt : [VOLATILE,UNSAFE] INTEGER := %IMMED 0 )
		: UNSIGNED ; EXTERNAL ;

[EXTERNAL] PROCEDURE News_Check (News_Group : VARYING [L] OF CHAR) ; EXTERNAL ;

BEGIN
LIB$GET_FOREIGN (Newsgroup) ;
News_Check (Newsgroup) ;
END.
