C NEWS.DEF

	Implicit None

c things you may need to change:
c	nwsgrpsz is the maximum length of the name of a new group.  48
c		characters seems to be sufficient. 32 is not.
c	mx_group is the maximum number of groups in a single .newsrc. 
c		the current value of 1500 may very well not be enough.
c	mx_range is the largest range of messages which can be unread
c		in a group.  

C VMS Constants
c	- added news group size, pr/910324
c	- added personal name size, jms/910325

	Parameter		UserIdSz = 32	! Length of a username
	Parameter		MAX_NEWSRC_LINE = 1024 ! Longest xx.newsrc line
 	Parameter		NwsGrpSz = 48	! Size of newsgroup name field 
	Parameter		PrsNmSz = 128	! Personal Name maximum
  
C Define incore group control structure

	Structure /GroupDef/

	  Character *(NwsGrpSz) Name		! Name
	  Logical		Subscribed	! User has subscribed
	  Logical		Newsrc_File	! Found in Newsrc file
	  Logical		Active_File	! Found in active file
	  Integer   *4		Active_Start	! Active file start
	  Integer   *4		Active_End	! Active file end
	  Logical		Active_Post	! Active file post flag
	  Integer   *4		Range_First	! Newsrc range list start
	  Integer   *4		Range_Last	! Newsrc range list end

	End Structure ! GroupDef

C Define group article range structure

	Structure /RangeDef/

	  Integer   *4		Next
	  Integer   *4		Start
	  Integer   *4		End

	End Structure ! RangeDef

C Define news parameters

	Parameter		LU_Newsrc      = 10
	Parameter		LU_Save        = 11
	Parameter		LU_EditIn      = 12
	Parameter		LU_EditOut     = 13
	Parameter		LU_Init        = 14
	Parameter		LU_VMSMail     = 15
	Parameter		LU_Signature   = 16
	Parameter		LU_MailOut     = 17
	Parameter		LU_KillFile    = 18

	Parameter		File_Name_Size = 128

	Parameter		Mx_Range =  35000
	Parameter		Mx_Group =  1500

C Define News common block
	
	Integer	    *4		Group_Count
	Record	    /GroupDef/	Group(Mx_Group)
	Integer	    *4		Range_Count
	Record	    /RangeDef/	Range(Mx_Range)
	Integer	    *4		Range_Free_List
	Integer     *4		Distribution_Count
	Character *16		Distribution(50)
	Character *64		DefaultDistribution
	Character *(NwsGrpSz)   NewsGroup
	Character *(UserIdSz)	UserName
	Character *64		UserDirectory
	Character *(PrsNmSz)	UserPersonalName
	Character *(PrsNmSz)	ReplyTo
	Character *64		UserMailDirectory
	Character *64		SiteId
	Character *64		Organization
	Character *128		PrintCommand
	Character *16		Mailer
	Character *16		Timezone	! timezone
	Logical			Kill_Done	! .true. if KILL file has
						!  already been used 
	Logical			GroupSelect	! .true. if user selected
						!  a group on the command
						!  line     - JMH 5/10/89
	Logical			Newsrc_Is_Open  ! .true. if user had a
						!  xx.newsrc file
	Character *20		Newsrc_CDT_VMS  ! xx.newsrc creation date time
						!  'dd-mmm-yyyy hh:mm:ss'
	Character *16 		Newsrc_CDT_News ! xx.newsrc creation date time
						!  'ddmmyy hhmmss'
	Character *16		Header(16)	! /Header = fields
	Integer   *4		Header_Count	!  Number of /header fields
	Logical			Header_Present	! .true. if /header present
	Character		Mark_Character	! Followup mark character
						! .true. if logical name
						!  MAIL$EDIT defined
	Logical			Mail_Cmd_Mail$Edit 
	Logical 		Rotated		! .true. if article last seen
						!  in rotated mode
	Logical			FirstFlag	! Used to skip multiple
						!  copies of subject line
						!   in Cmd_ArticleList
	Logical			Posting_Allowed ! .true. if posting is allowed
						!  by the server.
	Logical			NoAsk		! Auto answer flag
	Character *252		VisualEditor	! Name of the editor
	Integer   *4		VisualEditorLen !  length of the string
	Logical			IsEditorCallable! .true. if the visual editor
						!  can be called.
	Character *64		Authinfo_User	! Authinfo stuff
	Character *64		Authinfo_Pass
	Real *4			Time_In		! Time, in seconds, started
	Integer *4		Messages_Read	! number of messages read
	Integer *4		Answers_Written	! number of answers written
	Integer *4		Groups_Read	! number of groups looked at
	Integer *4		SubProc_PID	! ID of spawned subprocess
	Logical			Yow_Signature	! .true. if yow
	Logical			Obscure_Gratuitous_Lunar_Date ! no explanation

	Character *(File_Name_Size) 
	1			NewsRC_Loc	! location of XX.NEWSRC

C broken up into multiple commons to satisfy alignment requirements of
C fortran-hpo. jms/910619

	Common		/News1/
	1	Group_Count, Group,
	2	Range_Count, Range, Range_Free_List,
	3	Distribution_Count, Distribution, DefaultDistribution,
	4	UserName, UserDirectory, UserPersonalName, 
	5	UserMailDirectory, SiteId, Organization, 
	6	PrintCommand, Mailer, ReplyTo,
	7	Newsrc_CDT_VMS, Newsrc_CDT_News, Newsrc_Is_Open,
	8	Header_Present, Header_Count, Header,
	9	Mail_Cmd_Mail$Edit, Rotated, 
	1	FirstFlag, NewsGroup, GroupSelect, Kill_Done, 
	2	Posting_Allowed, NoAsk, Obscure_Gratuitous_Lunar_Date,
	3	VisualEditor, VisualEditorLen, IsEditorCallable,
	4	Authinfo_User, Authinfo_Pass, Yow_Signature,
	5	Time_In, Messages_Read, Answers_Written, Groups_Read,
	6	SubProc_PID, Timezone, NewsRC_Loc

	Common		/News2/
	1	Mark_Character
