From: xnybpf01@serss0 (Brian P Feeny)
Newsgroups: comp.sys.amiga.programmer
Subject: lc error
Date: 10 Sep 92 16:26:58 GMT
Organization: Florida International University, Miami

Newsgroups: comp.sys.amiga.programmer
Subject: Problem
Summary: 
Expires: 
Followup-To: 
Distribution: 
Organization: Florida International University, Miami
Keywords: 


	I am having trouble compiling some source with  Lattice 5.10, and would
like some help.  I am getting a "Error: 107 Too Many Initializers" right after
IntuiText Text structure.  I am simply compiling with the -L option and no others
.  Here is the source:

/* Calc_Border.c
 */
 
#include<exec/types.h>
#include<intuition/intuition.h>
 
struct IntuitionBase *IntuitionBase;
struct Window        *FirstWindow;
 
 
struct NewWindow FirstNewWindow =
{
   160,50,     /* LeftEdge, TopEdge */
   320,150,    /* Width, Height */
   0,1,        /* DetailPen, BlockPen */
   CLOSEWINDOW, /* IDCMP Flags */
   WINDOWDEPTH | /* Flags */
   WINDOWSIZING |
   WINDOWDRAG |
   WINDOWCLOSE |
   SMART_REFRESH,
   NULL,       /* First Gadget */
   NULL,       /* CheckMark */
   (UBYTE *)"System programming test", /* Title */
   NULL,       /* Screen */
   NULL,       /* BitMap */
   100,50,     /* Min Width, Height */
   640,200,    /* Max Width, Height */
   WBENCHSCREEN /* Type */
};
 
SHORT Values[] =
{
   0,0,
   999,0,
   999,10,
   0,10,
   0,0
};
 
struct Border Bord =
{
   0,0,
   1,0,
   JAM1,
   5,
   Values,
   NULL
};
 
struct IntuiText Text =
{
   1,0,    /* FrontPen, BackPen */
   JAM2,   /* DrawMode */
   2,2,    /* LeftEdge, TopEdge */
   NULL,   /* Font */
   (UBYTE *)"Test",    /* TextPointer */
   NULL                 /* NextText */
   );
   
   
void Open_All(), Close_All();
 
main()
{
   struct RastPort *RP;
   
   Open_All();
   
   RP = FirstWindow->RPort;
   
   Calc_Border(&Text);
   
   DrawBorder(RP,&Bord,10L,30L);
   PrintIText(RP,&Text,10L,30L);
   
   Delay(180L);
   
   Close_All();
   
}
 
 
/* Open All */
 
void Open_All()
{
   void  *OpenLibrary();
   struct Window *OpenWindow();
   
   
   if(!(IntuitionBase =(struct IntuitionBase *)
      OpenLibrary("intuition.library",0L)))
      {
         printf("Unable to open Intuition Library!!!\n");
         Close_All();
         exit(FALSE);
      }
      
 
   if(!(FirstWindow = (struct Window *)
      OpenWindow(&FirstNewWindow)))
      {
         printf("Window cannot be opened!!!\n");
         Close_All();
         exit(FALSE);
      }
   }
   
/* Close Everything */
 
void Close_All()
{
   if(FirstWindow) CloseWindow(FirstWindow);
   if(IntuitionBase) CloseLibrary(IntuitionBase);
   }
      
/* Calc_Border */
 
Calc_Border(Text)
struct IntuiText *Text;
{
   int Width =0;
   
   Width = IntuiTextLength(Text);
   
   Values[2]=Width+4; 
   Values[4]=Width+4;
   }
       
              
   
                                  
                                         
   
 
	This program is listed verbatum in Amiga C for Advanced Programmers by
Abacus Page 173.  Thanks.

						Brian
-- 
Brian Feeny - Systems Programmer - UNIX System Security Specialist
   __
__///          Internet: signal@phantom.com       "Grep me no patterns and
\XX/ AMIGA!              xnybpf01@serss0.fiu.edu   I'll tell you no lines"