🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6047

Lattice 5.10 #pragma limit

#6047
From: Andrew Folkins
Date: Tue, 23 Oct 1990 02:48
69 lines
2530 bytes
According to the docs (Preface pg. xv), the limit on parameters to a
#pragma call has been raised to 14, "allowing ALL Amiga library functions
to be called with parameters in registers."  Except that when I used
the #pragma for NewModifyProp(), lc2 gurus (tb reports foo.0000000b).
Take out the pragma, and it compiles fine.  Has anyone else run into this?

============================== cut here ====================================
/*
 * compile with: lc test.c
 */

#include <exec/types.h>
#include <intuition/intuition.h>
#include <proto/intuition.h>

struct ExtPropInfo {
   struct PropInfo pi;
   UWORD Overlap,        /* Amount of overlap between successive views */
         TotalLines,
         VisibleLines,
         TopLine;
};

void SetPropPosition(window, gadget, topline, refresh)
struct Window *window;
struct Gadget *gadget;
UWORD topline;
short refresh;
{
   UWORD hidden;
   struct ExtPropInfo *epi;

   epi = (struct ExtPropInfo *)gadget->SpecialInfo;

   /* Don't have to update imagery */
   if (epi->TopLine == topline && !refresh)
      return;

   epi->TopLine = topline;

   /* Find the number of hidden lines */
   hidden = max(epi->TotalLines - epi->VisibleLines, 0);

   /* If we can't fill the last display, reduce TopLine */
   if (epi->TopLine > hidden)
      epi->TopLine = hidden;

   if (hidden > 0)
      epi->pi.VertBody = (UWORD)((ULONG)(epi->VisibleLines - epi->Overlap) * MAXBODY
                                      / (epi->TotalLines - epi->Overlap));
   else
      epi->pi.VertBody = MAXBODY;

   if (hidden > 0)
      epi->pi.VertPot = (UWORD)(((ULONG)epi->TopLine * MAXPOT) / hidden);
   else
      epi->pi.VertPot = 0;

   if (window)
      NewModifyProp(gadget, window, NULL, epi->pi.Flags,
                    0, epi->pi.VertPot, 0, epi->pi.VertBody, 1);
}

============================== and here ====================================

--
  Andrew Folkins  ...!alberta!edm!cuenews!andrew   Edmonton, Alberta, Canada
                                  ^A1000^
  Newsfeed for the Amiga SIG of the Commodore Users of Edmonton (AmiCUE)
Technical Details
Message-ID: <1364.AA1364@cuenews>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc!ubc-cs!alberta!adec23!edm!cuenews!andrew

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc!ubc-cs!alberta!adec23!edm!cuenews!andrew
From: andrew@cuenews.UUCP (Andrew Folkins)
Newsgroups: comp.sys.amiga.tech
Subject: Lattice 5.10 #pragma limit
Message-ID: <1364.AA1364@cuenews>
Date: 23 Oct 90 02:48:48 GMT
Followup-To: comp.sys.amiga.tech
Distribution: na
Organization: AmiCUE (Amiga SIG, Commodore Users of Edmonton)
Lines: 69