/batch/prs.c
C | 7368 lines | 5905 code | 179 blank | 1284 comment | 1701 complexity | a40097fcc40f9fa398a3f22ca83b42ec MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- /*
- *
- * (c) COPYRIGHT INRIA 1996-2009
- * Please first read the full copyright statement in file COPYRIGHT.
- *
- */
- /*
- * Ce programme compile un schema de presentation contenu dans un fichier
- * de type .P
- * Il est dirige par la grammaire du langage de presentation
- * contenue, sous forme codee, dans le fichier PRESEN.GRM.
- * Il produit un fichier de type .PRS qui sera ensuite utilise par Thot
- *
- * Authors: V. Quint (INRIA)
- * R. Guetari (W3C/INRIA): Windows routines.
- *
- */
- #undef THOT_EXPORT
- #define THOT_EXPORT extern
- #include "thot_sys.h"
- #include "constgrm.h"
- #include "constmedia.h"
- #include "compilmsg.h"
- #include "prsmsg.h"
- #include "message.h"
- #include "typemedia.h"
- #include "typegrm.h"
- #include "fileaccess.h"
- #include "prsdef.h"
- #include "fileaccess.h"
- #include "compil_tv.h"
- #include "thotcolor.h"
- #include "thotcolor_tv.h"
- #include "thotpattern.h"
- #include "analsynt_tv.h"
- #include "compil_tv.h"
- #ifdef _WINGUI
- #define FATAL_EXIT_CODE 33
- #define COMP_SUCCESS 0
- #else /* !_WINGUI */
- #define FATAL_EXIT_CODE -1
- #endif /* _WINGUI */
- int LineNum; /* compteur de lignes dans le fichier source */
- static PtrPSchema pPSchema; /* Schema de presentation genere */
- static PtrSSchema pSSchema; /* Schema de structure */
- static int CurView; /* numero de la vue courante */
- static PtrPRule FirstRule; /* pointeur sur la premiere regle de la suite
- de regles courante */
- static PtrPRule CurRule; /* pointeur sur la regle de present. courante*/
- static PtrPRule NextRule; /* pointeur sur la regle de present. suivante*/
- static int CurAttrNum; /* numero de l'attribut en cours */
- static AttributePres *CurAttrPRule;
- static int CurAttrVal; /* numero de la valeur d'attr en cours*/
- static int CurComparAttr; /* numero de l'attribut de comparaison */
- static int CurElemHeritAttr; /* numero de l'element heritant de cet
- attribut */
- static ThotBool CurElemHeritAttrSelf; /* la presentation s'applique meme
- si c'est l'element lui-meme qui
- porte l'attribut herite' */
- static int CurAttrLowerBound; /* borne inferieure de comparaison */
- static int CurAttrUpperBound; /* borne superieure de comparaison */
- static ThotBool CurTextDefined; /* une valeur d'attribut a ete definie
- dans un selecteur */
- static Name CurTextEqual; /* valeur d'attribut textuel */
- static int CurType; /* numero de la regle de struct definissant
- le type dont on analyse les regles de
- presentation */
- static int CurPresBox; /* numero de la boite de presentation courante */
- static ThotBool ViewDef; /* on est dans la definition des vues */
- static ThotBool CounterDef; /* on est dans la definition des compteurs */
- static ThotBool ConstantDef; /* on est dans la definition des constantes*/
- static ThotBool VariableDef; /* on est dans la definition des variables */
- static CounterValue CurMinMax; /* SyntacticType de la valeur du compteur */
- static ThotBool PresBoxDef; /* on est dans la definition des boites */
- static ThotBool DefaultRuleDef; /* on est dans la definition des regles
- par defaut */
- static ThotBool RuleDef; /* on est dans la definition des regles */
- static ThotBool AttributeDef; /* on est dans la definition des attributs */
- static ThotBool NewAttributeDef; /* definition d'un nouveau paquet de regles
- de presentation d'un attribut */
- static int TransmittedCounter; /* numero du compteur dont on traite la regle
- de transmission */
- static int TransmittedElem; /* type de l'element dont on traite la regle
- de transmission */
- static ThotBool InInLineRule; /* on est dans une regle 'InLine' */
- static ThotBool IncludedColumn;
- static ThotBool InRule; /* on est dans une regle */
- static ThotBool InWithinCond; /* on est dans une condition 'Within' */
- static ThotBool CondInheritedAttr; /* on est dans une condition 'Inherited attr' */
- static ThotBool AxisDef; /* le prochain repere boite rencontre est une
- definition de repere */
- static ThotBool Forward; /* on est dans une reference en avant pour une
- boite */
- static ThotBool CondBlock; /* on est dans un bloc de condition */
- static ThotBool ViewBlock; /* on est dans un bloc de vues */
- static ThotBool RuleBlock; /* on est dans un bloc de regles */
- static ThotBool RulesForView; /* on est dans les regles d'une vue */
- static ThotBool NewVariableDef; /* on definit une nouvelle variable */
- static int LatestNumber; /* valeur absolue du dernier nombre recontre */
- static ThotBool LatestNumberAttr; /* LatestNumber est un numero d'attribut numerique */
- static int PrevSign; /* signe du dernier nombre rencontre */
- static int AncestorSign; /* signe du dernier niveau d'ancetre rencontre'
- dans un compteur */
- static enum
- {
- Centimeter, Millimeter, Point, Pica, Inch, ScreenPixel, FontHeight,
- XHeight, Percent
- }
- CurUnit;
- static int AttrValSign; /* signe (+1 ou -1) de la derniere valeur
- d'attribut rencontree (AttrRelat) */
- static PtrCondition Conditions; /* les conditions du IF */
- static ThotBool Immediately; /* Pour les conditions avec Immediately Within */
- static ThotBool SignGreaterOrLess; /* il y a un signe > ou < dans la condition
- Within en cours de traitement */
- static int CurCondCntSign; /* signe dans une condition */
- static Name CopyType; /* nom du type qui apparait dans la regle Copy */
- static int BeginCopyType; /* indice dans la ligne du debut de ce nom */
- static PtrSSchema pExternalSS; /* pointeur sur le schema de structure externe */
- static ThotBool InCondPage; /* on est dans une condition Even, Odd ou One */
- static ThotBool InclusionRefName; /* le nom de type qui suit doit etre interprete
- comme le nom d'une reference d'inclusion
- sans expansion */
- static ThotBool VCondLess; /* on est dans une condition 'Less' */
- static ThotBool VCondGreater; /* on est dans une condition 'Greater' */
- static ThotBool CondEqual; /* on est dans une condition 'Equal' */
- static ThotBool FirstInPair; /* on a rencontre' "First" */
- static ThotBool SecondInPair; /* on a rencontre' "Second" */
- static ThotBool AttrInitCounter; /* on a rencontre' "Init" dans une definition
- de compteur */
- #include "compilmsg_f.h"
- #include "parser_f.h"
- #include "platform_f.h"
- #include "prs_f.h"
- #include "memory_f.h"
- #include "message_f.h"
- #include "readstr_f.h"
- #include "registry_f.h"
- #include "writeprs_f.h"
- #ifdef _WINGUI
- #include "compilers_f.h"
- #ifndef DLLEXPORT
- #define DLLEXPORT __declspec (dllexport)
- #endif /* DLLEXPORT */
- #endif /* _WINGUI */
- /*----------------------------------------------------------------------
- Initialize
- ----------------------------------------------------------------------*/
- static void Initialize ()
- {
- int size;
- /* acquiert un schema de presentation */
- GetSchPres (&pPSchema);
- if (pPSchema == NULL)
- /* memoire insuffisante */
- CompilerMessage (0, PRS, FATAL, NO_MORE_MEM_LEFT, inputLine, LineNum);
- else
- {
- /* acquiert un schema de structure pour les structures externes */
- GetSchStruct (&pExternalSS);
- if (pExternalSS == NULL)
- TtaDisplaySimpleMessage (FATAL, PRS, NO_MORE_MEM_LEFT);
- else
- {
- size = pSSchema->SsNAttributes * sizeof (PtrAttributePres);
- pPSchema->PsAttrPRule = (AttrPresTable*) malloc (size);
- if (pPSchema->PsAttrPRule)
- memset (pPSchema->PsAttrPRule, 0, size);
- size = pSSchema->SsNAttributes * sizeof (int);
- pPSchema->PsNAttrPRule = (NumberTable*) malloc (size);
- if (pPSchema->PsNAttrPRule)
- memset (pPSchema->PsNAttrPRule, 0, size);
- size = pSSchema->SsNRules * sizeof (PtrPRule);
- pPSchema->PsElemPRule = (PtrPRuleTable*) malloc (size);
- if (pPSchema->PsElemPRule)
- memset (pPSchema->PsElemPRule, 0, size);
- size = pSSchema->SsNAttributes * sizeof (int);
- pPSchema->PsNHeirElems = (NumberTable*) malloc (size);
- if (pPSchema->PsNHeirElems)
- memset (pPSchema->PsNHeirElems, 0, size);
- size = pSSchema->SsNRules * sizeof (int);
- pPSchema->PsNInheritedAttrs = (NumberTable*) malloc (size);
- if (pPSchema->PsNInheritedAttrs)
- memset (pPSchema->PsNInheritedAttrs, 0, size);
- /****
- size = pSSchema->SsNRules * sizeof (PtrInheritAttrTable);
- pPSchema->PsInheritedAttr = (InheritAttrTbTb*) malloc (size);
- if (pPSchema->PsInheritedAttr)
- memset (pPSchema->PsInheritedAttr, 0, size);
- ***/
- size = pSSchema->SsNAttributes * sizeof (int);
- pPSchema->PsNComparAttrs = (NumberTable*) malloc (size);
- if (pPSchema->PsNComparAttrs)
- memset (pPSchema->PsNComparAttrs, 0, size);
- size = pSSchema->SsNAttributes * sizeof (PtrAttributePres);
- pPSchema->PsComparAttr = (CompAttrTbTb*) malloc (size);
- if (pPSchema->PsComparAttr)
- memset (pPSchema->PsComparAttr, 0, size);
- size = pSSchema->SsNRules * sizeof (int);
- pPSchema->PsElemTransmit = (NumberTable*) malloc (size);
- if (pPSchema->PsElemTransmit)
- memset (pPSchema->PsElemTransmit, 0, size);
- CurMinMax = CntCurVal;
- /* initialise les indicateurs du compilateur */
- ViewDef = False;
- CounterDef = False;
- ConstantDef = False;
- VariableDef = False;
- PresBoxDef = False;
- DefaultRuleDef = False;
- RuleDef = False;
- AttributeDef = False;
- CurAttrNum = 0;
- NewAttributeDef = False;
- InInLineRule = False;
- IncludedColumn = False;
- InRule = False;
- InWithinCond = False;
- AxisDef = False;
- Forward = False;
- CondBlock = False;
- ViewBlock = False;
- RuleBlock = False;
- RulesForView = False;
- NewVariableDef = False;
- LatestNumber = 0;
- LatestNumberAttr = False;
- PrevSign = 1;
- CurUnit = FontHeight;
- AttrValSign = 1;
- CurView = 1;
- CurRule = NULL;
- FirstRule = NULL;
- CurType = 1;
- GetPresentRule (&NextRule);
- if (NextRule == NULL)
- /* memoire insuffisante */
- CompilerMessage (0, PRS, FATAL, NO_MORE_MEM_LEFT, inputLine,
- LineNum);
- Conditions = NULL;
- InclusionRefName = False;
- CopyType[0] = EOS;
- BeginCopyType = 0;
- FirstInPair = False;
- SecondInPair = False;
- }
- }
- }
- /*----------------------------------------------------------------------
- CopyName copy the word of length wl startig at position
- wi in buffer inputLine into string n.
- ----------------------------------------------------------------------*/
- static void CopyName (Name n, indLine wi, indLine wl)
- {
- if (wl > MAX_NAME_LENGTH - 1)
- CompilerMessage (wi, PRS, FATAL, WORD_SIZE_OVERFLOW, inputLine, LineNum);
- else
- {
- strncpy ((char *)n, (char *)&inputLine[wi - 1], MAX_NAME_LENGTH);
- n[wl] = EOS;
- }
- }
- /*----------------------------------------------------------------------
- CheckConditions verifie qu'il n'y a aucune condition courante
- ou qu'il n'y a que des conditions Within ou Root.
- ----------------------------------------------------------------------*/
- static void CheckConditions (indLine wi)
- {
- PtrCondition pCond;
- pCond = Conditions;
- while (pCond != NULL)
- if (pCond->CoCondition != PcWithin &&
- pCond->CoCondition != PcDefaultCond &&
- pCond->CoCondition != PcRoot &&
- pCond->CoCondition != PcElemType)
- {
- CompilerMessage (wi, PRS, FATAL, ONLY_CONDITION_WITHIN, inputLine,
- LineNum);
- pCond = NULL;
- }
- else
- pCond = pCond->CoNextCondition;
- }
- /*----------------------------------------------------------------------
- ConditionEnd
- ----------------------------------------------------------------------*/
- static void ConditionEnd ()
- {
- InWithinCond = False;
- if (CopyType[0] != EOS)
- /* on n'a pas encore traite' le nom de type suppose' externe */
- /* ce nom de type est donc erronne' */
- {
- CompilerMessage (BeginCopyType, PRS, FATAL, UNDECLARED_IDENTIFIER,
- inputLine, LineNum);
- CopyType[0] = EOS;
- BeginCopyType = 0;
- }
- }
- /*----------------------------------------------------------------------
- CreatePRule cree une nouvelle regle de type t
- ----------------------------------------------------------------------*/
- static void CreatePRule (PRuleType t, indLine wi)
- {
- PtrPRule pPRuleV;
- ConditionEnd ();
- if (t != PtFunction)
- /* ce n'est pas une regle fonction. Verifie qu'il n'y a que des
- conditions Within parmi les conditions courantes */
- CheckConditions (wi);
- CurRule = NextRule;
- GetPresentRule (&NextRule);
- if (NextRule == NULL)
- /* memoire insuffisante */
- CompilerMessage (0, PRS, FATAL, NO_MORE_MEM_LEFT, inputLine, LineNum);
- CurRule->PrType = t;
- CurRule->PrCond = Conditions;
- CurRule->PrNextPRule = NextRule;
- CurRule->PrViewNum = CurView;
- CurRule->PrPresMode = PresImmediate;
- switch (t)
- {
- case PtVisibility:
- case PtListStyleImage:
- case PtDepth:
- case PtFillPattern:
- case PtBackground:
- case PtForeground:
- case PtColor:
- case PtStopColor:
- case PtBorderTopColor:
- case PtBorderRightColor:
- case PtBorderBottomColor:
- case PtBorderLeftColor:
- CurRule->PrValueType = PrNumValue;
- CurRule->PrIntValue = 0;
- break;
- case PtOpacity:
- case PtStrokeOpacity:
- case PtFillOpacity:
- case PtStopOpacity:
- CurRule->PrValueType = PrNumValue;
- CurRule->PrIntValue = 1000;
- case PtListStyleType:
- CurRule->PrChrValue = 'N'; /* None par defaut */
- case PtListStylePosition:
- CurRule->PrChrValue = 'O'; /* Outside par defaut */
- case PtDisplay:
- CurRule->PrChrValue = 'U'; /* Undefined par defaut */
- case PtFont:
- CurRule->PrChrValue = 'T'; /* Times par defaut */
- break;
- case PtStyle:
- CurRule->PrChrValue = 'R'; /* Romain par defaut */
- break;
- case PtWeight:
- CurRule->PrChrValue = 'N'; /* Normal par defaut */
- break;
- case PtUnderline:
- CurRule->PrChrValue = 'N'; /* Pas de souligne par defaut*/
- break;
- case PtThickness:
- CurRule->PrChrValue = 'N'; /* souligne mince par defaut */
- break;
- case PtDirection:
- CurRule->PrChrValue = 'L'; /* Left to right by default */
- break;
- case PtUnicodeBidi:
- CurRule->PrChrValue = 'N'; /* Normal by default */
- break;
- case PtFloat:
- case PtClear:
- CurRule->PrChrValue = 'N'; /* None by default */
- break;
- case PtLineStyle:
- case PtBorderTopStyle:
- case PtBorderRightStyle:
- case PtBorderBottomStyle:
- case PtBorderLeftStyle:
- CurRule->PrChrValue = 'S'; /* trait continu par defaut */
- break;
- case PtBreak1:
- case PtBreak2:
- case PtIndent:
- case PtSize:
- case PtLineSpacing:
- case PtLineWeight:
- case PtMarginTop:
- case PtMarginRight:
- case PtMarginBottom:
- case PtMarginLeft:
- case PtPaddingTop:
- case PtPaddingRight:
- case PtPaddingBottom:
- case PtPaddingLeft:
- case PtBorderTopWidth:
- case PtBorderRightWidth:
- case PtBorderBottomWidth:
- case PtBorderLeftWidth:
- CurRule->PrMinUnit = UnRelative;
- CurRule->PrMinAttr = False;
- CurRule->PrMinValue = 0;
- break;
- case PtAdjust:
- CurRule->PrAdjust = AlignLeft;
- break;
- case PtVertRef:
- case PtHorizRef:
- case PtVertPos:
- case PtHorizPos:
- CurRule->PrPosRule.PoPosDef = NoEdge;
- CurRule->PrPosRule.PoPosRef = NoEdge;
- CurRule->PrPosRule.PoDistUnit = UnRelative;
- CurRule->PrPosRule.PoDeltaUnit = UnRelative;
- CurRule->PrPosRule.PoDistAttr = False;
- CurRule->PrPosRule.PoDistance = 0;
- CurRule->PrPosRule.PoDistDelta = 0;
- CurRule->PrPosRule.PoRelation = RlSameLevel;
- CurRule->PrPosRule.PoNotRel = False;
- CurRule->PrPosRule.PoRefKind = RkAnyBox;
- CurRule->PrPosRule.PoUserSpecified = False;
- CurRule->PrPosRule.PoRefIdent = 0;
- break;
- case PtHeight:
- case PtWidth:
- CurRule->PrDimRule.DrPosition = False;
- CurRule->PrDimRule.DrAbsolute = True;
- CurRule->PrDimRule.DrUnit = UnRelative;
- CurRule->PrDimRule.DrAttr = False;
- CurRule->PrDimRule.DrValue = 0;
- CurRule->PrDimRule.DrRelation = RlSameLevel;
- CurRule->PrDimRule.DrNotRelat = False;
- CurRule->PrDimRule.DrRefKind = RkAnyBox;
- CurRule->PrDimRule.DrMin = False;
- CurRule->PrDimRule.DrUserSpecified = False;
- CurRule->PrDimRule.DrRefIdent = 0;
- break;
- default:
- break;
- }
- /* verifie que cette regle n'est pas deja presente pour cette vue */
- pPRuleV = FirstRule;
- while (pPRuleV != NULL && pPRuleV != CurRule)
- {
- if (pPRuleV->PrViewNum == CurView)
- if (pPRuleV->PrType == t)
- if (t != PtFunction)
- /* seules les fonctions peuvent etre en plusieurs exemplaires */
- if (CurRule->PrCond == NULL)
- /* les regles sans condition ne peuvent pas figurer en
- plusieurs exemplaires */
- CompilerMessage (wi, PRS, FATAL, RULE_ALREADY_DEFINED,
- inputLine, LineNum);
- pPRuleV = pPRuleV->PrNextPRule;
- }
- }
- /*----------------------------------------------------------------------
- SetLevel
- ----------------------------------------------------------------------*/
- static void SetLevel (Level lev, indLine wi)
- {
- if ((CurRule->PrType == PtVertRef || CurRule->PrType == PtHorizRef) &&
- !(lev == RlEnclosed || lev == RlSelf))
- CompilerMessage (wi, PRS, FATAL, ONLY_ENCLOSED_AND_ARE_ALLOWED,
- inputLine, LineNum);
- else if (lev == RlEnclosed && (CurRule->PrType == PtVertPos ||
- CurRule->PrType == PtHorizPos))
- /* position par rapport au contenu, erreur */
- CompilerMessage (wi, PRS, FATAL, FORBIDDEN_IN_A_POSITION, inputLine,
- LineNum);
- else
- switch (CurRule->PrType)
- {
- case PtVertRef:
- case PtHorizRef:
- case PtVertPos:
- case PtHorizPos:
- CurRule->PrPosRule.PoRelation = lev;
- break;
- case PtHeight:
- case PtWidth:
- if (CurRule->PrDimRule.DrPosition)
- CurRule->PrDimRule.DrPosRule.PoRelation = lev;
- else
- CurRule->PrDimRule.DrRelation = lev;
- break;
- default:
- break;
- }
- }
- /*----------------------------------------------------------------------
- CheckBoxEnd
- ----------------------------------------------------------------------*/
- static void CheckBoxEnd ()
- {
- if (PresBoxDef)
- /* fin des regles de presentation d'une boite */
- {
- if (pPSchema->PsPresentBox->PresBox[CurPresBox - 1]->PbFirstPRule == NextRule)
- /* aucune regle (seulement 'Content') */
- pPSchema->PsPresentBox->PresBox[CurPresBox - 1]->PbFirstPRule = NULL;
- }
- if (CurRule != NULL)
- CurRule->PrNextPRule = NULL;
- }
- /*----------------------------------------------------------------------
- EndOfRulesForType fin des regles de presentation associees
- a un type d'element structure' ou a une valeur
- d'attribut. On verifie si au moins une regle a
- ete definie pour ce type ou cet attribut.
- ----------------------------------------------------------------------*/
- static void EndOfRulesForType ()
- {
- AttributePres *pPRuleA;
- NumAttrCase *pAttrCase;
- int l;
- if (RuleDef && CurType > 0)
- {
- if (pPSchema->PsElemPRule->ElemPres[CurType - 1] == NextRule)
- /* aucune regle de presentation pour ce type d'element */
- pPSchema->PsElemPRule->ElemPres[CurType - 1] = NULL;
- }
- else if (AttributeDef && CurAttrNum > 0)
- {
- pPRuleA = pPSchema->PsAttrPRule->AttrPres[CurAttrNum - 1];
- for (l = pPSchema->PsNAttrPRule->Num[CurAttrNum - 1]; --l > 0;
- pPRuleA = pPRuleA->ApNextAttrPres)
- if (pPRuleA->ApElemType == CurElemHeritAttr)
- break;
- if (pPRuleA)
- {
- /* selon le type de l'attribut */
- switch (pSSchema->SsAttribute->TtAttr[CurAttrNum - 1]->AttrType)
- {
- case AtNumAttr:
- pAttrCase = &pPRuleA->ApCase[pPRuleA->ApNCases - 1];
- if (pAttrCase->CaFirstPRule == NextRule)
- pAttrCase->CaFirstPRule = NULL;
- break;
- case AtTextAttr:
- if (pPRuleA->ApTextFirstPRule == NextRule)
- pPRuleA->ApTextFirstPRule = NULL;
- break;
- case AtReferenceAttr:
- if (pPRuleA->ApRefFirstPRule == NextRule)
- pPRuleA->ApRefFirstPRule = NULL;
- break;
- case AtEnumAttr:
- if (pPRuleA->ApEnumFirstPRule[CurAttrVal] == NextRule)
- pPRuleA->ApEnumFirstPRule[CurAttrVal] = NULL;
- break;
- default:
- break;
- }
- }
- }
- }
- /*----------------------------------------------------------------------
- NewVarListItem alloue une nouvelle entree dans la table des
- items constituant une variable de presentation.
- ----------------------------------------------------------------------*/
- static void NewVarListItem (PresVariable * pVar, indLine wi)
- {
- if (pVar->PvNItems > 0)
- /* ce n'est pas le premier element de la variable */
- /* si le 1er element n'est pas du texte, on n'accepte pas le */
- /* nouvel element */
- if (pVar->PvItem[0].ViType == VarText)
- if (pPSchema->PsConstant[pVar->PvItem[0].ViConstant - 1].PdType !=
- CharString)
- CompilerMessage (wi, PRS, FATAL,
- MAX_FUNCTIONS_IN_A_VARIABLE_OVERFLOW, inputLine,
- LineNum);
- if (pVar->PvNItems >= MAX_PRES_VAR_ITEM)
- CompilerMessage (wi, PRS, FATAL, MAX_FUNCTIONS_IN_A_VARIABLE_OVERFLOW,
- inputLine, LineNum);
- else
- pVar->PvNItems++;
- }
- /*----------------------------------------------------------------------
- NewCondition alloue une nouvelle condition
- ----------------------------------------------------------------------*/
- static void NewCondition (indLine wi)
- {
- PtrCondition newCond;
- /* acquiert un bloc memoire pour une nouvelle condition */
- GetPresentRuleCond (&newCond);
- if (newCond == NULL)
- /* memoire insuffisante */
- CompilerMessage (0, PRS, FATAL, NO_MORE_MEM_LEFT, inputLine, LineNum);
- else
- {
- Immediately = False;
- /* chaine la nouvelle condition en tete */
- newCond->CoNextCondition = Conditions;
- Conditions = newCond;
- /* initialise la nouvelle condition */
- newCond->CoNotNegative = True;
- newCond->CoTarget = False;
- CurCondCntSign = 1;
- InCondPage = False;
- }
- }
- /*----------------------------------------------------------------------
- NewConst alloue une nouvelle entree dans la table des
- constantes du schema de presentation
- ----------------------------------------------------------------------*/
- static void NewConst (indLine wi)
- {
- if (pPSchema->PsNConstants >= MAX_PRES_CONST)
- CompilerMessage (wi, PRS, FATAL, MAX_CONSTANTS_OVERFLOW, inputLine,
- LineNum);
- else
- {
- pPSchema->PsConstant[pPSchema->PsNConstants].PdScript = 'L';
- pPSchema->PsConstant[pPSchema->PsNConstants].PdType = CharString;
- pPSchema->PsNConstants++;
- }
- }
- /*----------------------------------------------------------------------
- NewVar alloue une nouvelle entree dans la table des variables
- variables du schema de presentation
- ----------------------------------------------------------------------*/
- static void NewVar (indLine wi)
- {
- PtrPresVariable var;
- int i, size;
- if (pPSchema->PsNVariables >= pPSchema->PsVariableTableSize)
- /* the variable table is full. Extend it */
- {
- /* add 10 new entries */
- size = pPSchema->PsNVariables + 10;
- i = size * sizeof (PtrPresVariable);
- if (!pPSchema->PsVariable)
- pPSchema->PsVariable = (PresVarTable*) malloc (i);
- else
- pPSchema->PsVariable = (PresVarTable*) realloc (pPSchema->PsVariable, i);
- if (!pPSchema->PsVariable)
- {
- CompilerMessage (wi, PRS, FATAL, MAX_VARIABLES_OVERFLOW, inputLine,
- LineNum);
- return;
- }
- else
- {
- pPSchema->PsVariableTableSize = size;
- for (i = pPSchema->PsNVariables; i < size; i++)
- pPSchema->PsVariable->PresVar[i] = NULL;
- }
- }
- /* allocate and initialize a new variable */
- var = (PtrPresVariable) malloc (sizeof (PresVariable));
- if (var == NUL)
- /* can't allocate a new variable */
- {
- CompilerMessage (wi, PRS, FATAL, MAX_VARIABLES_OVERFLOW, inputLine,
- LineNum);
- return;
- }
- memset (var, 0, sizeof (PresVariable));
- pPSchema->PsVariable->PresVar[pPSchema->PsNVariables] = var;
- pPSchema->PsNVariables++;
- var->PvNItems = 0;
- }
- /*----------------------------------------------------------------------
- Round arrondit un float en un int.
- ----------------------------------------------------------------------*/
- static int Round (float e)
- {
- register int result;
- if (e < 0.0)
- result = (int) (e - 0.5);
- else
- result = (int) (e + 0.5);
- return result;
- }
- /*----------------------------------------------------------------------
- EndOfNumber
- ----------------------------------------------------------------------*/
- static void EndOfNumber ()
- {
- TypeUnit unit;
- unit = UnRelative;
- if (LatestNumber != 0)
- {
- if (LatestNumberAttr)
- /* on ne convertit pas les numeros d'attribut */
- switch (CurUnit)
- {
- case Centimeter:
- case Millimeter:
- case Point:
- case Pica:
- case Inch:
- unit = UnPoint;
- break;
- case ScreenPixel:
- unit = UnPixel;
- break;
- case FontHeight:
- unit = UnRelative;
- break;
- case XHeight:
- unit = UnXHeight;
- break;
- case Percent:
- unit = UnPercent;
- break;
- default:
- fprintf (stderr, "Invalid distance unit %X\n", CurUnit);
- break;
- }
- else
- /* convertit les unite's de longueur */
- switch (CurUnit)
- {
- case Centimeter:
- /* convertit les centimetres en points typo */
- LatestNumber = Round ((float) (LatestNumber * 72) / 2540);
- unit = UnPoint;
- break;
- case Millimeter:
- /* convertit les millimetres en points typo */
- LatestNumber = Round ((float) (LatestNumber * 72) / 25400);
- unit = UnPoint;
- break;
- case Point:
- /* arrondit en points typo */
- LatestNumber = Round ((float) LatestNumber / 1000);
- unit = UnPoint;
- break;
- case Pica:
- /* convertit les picas en points typo */
- LatestNumber = Round ((float) (LatestNumber * 12) / 1000);
- unit = UnPoint;
- break;
- case Inch:
- /* convertit les pouces en points typo */
- LatestNumber = Round ((float) (LatestNumber * 72) / 1000);
- unit = UnPoint;
- break;
- case ScreenPixel:
- /* arrondit en pixels */
- LatestNumber = Round ((float) LatestNumber / 1000);
- unit = UnPixel;
- break;
- case FontHeight:
- /* convertit en 1/10 */
- LatestNumber = Round ((float) LatestNumber / 100);
- unit = UnRelative;
- break;
- case XHeight:
- /* convertit en 1/10 */
- LatestNumber = Round ((float) LatestNumber / 100);
- unit = UnXHeight;
- break;
- case Percent:
- LatestNumber = Round ((float) LatestNumber / 1000);
- unit = UnPercent;
- break;
- default:
- fprintf (stderr, "Invalid distance unit %X\n", CurUnit);
- break;
- }
-
- LatestNumber = LatestNumber * PrevSign;
- if (CurRule->PrPresMode == PresInherit)
- {
- if (CurRule->PrType == PtIndent ||
- CurRule->PrType == PtLineSpacing ||
- CurRule->PrType == PtLineWeight)
- {
- CurRule->PrInhDelta = LatestNumber;
- CurRule->PrInhAttr = LatestNumberAttr;
- CurRule->PrInhUnit = unit;
- }
- }
- else
- switch (CurRule->PrType)
- {
- case PtBreak1:
- case PtBreak2:
- case PtIndent:
- case PtSize:
- case PtLineSpacing:
- case PtLineWeight:
- case PtMarginTop:
- case PtMarginRight:
- case PtMarginBottom:
- case PtMarginLeft:
- case PtPaddingTop:
- case PtPaddingRight:
- case PtPaddingBottom:
- case PtPaddingLeft:
- case PtBorderTopWidth:
- case PtBorderRightWidth:
- case PtBorderBottomWidth:
- case PtBorderLeftWidth:
- CurRule->PrMinUnit = unit;
- CurRule->PrMinAttr = LatestNumberAttr;
- CurRule->PrMinValue = LatestNumber;
- break;
- case PtVertRef:
- case PtHorizRef:
- case PtVertPos:
- case PtHorizPos:
- CurRule->PrPosRule.PoDistUnit = unit;
- CurRule->PrPosRule.PoDistAttr = LatestNumberAttr;
- CurRule->PrPosRule.PoDistance = LatestNumber;
- break;
- case PtHeight:
- case PtWidth:
- if (CurRule->PrDimRule.DrPosition)
- {
- CurRule->PrDimRule.DrPosRule.PoDistUnit = unit;
- CurRule->PrDimRule.DrPosRule.PoDistAttr = LatestNumberAttr;
- CurRule->PrDimRule.DrPosRule.PoDistance = LatestNumber;
- }
- else
- {
- CurRule->PrDimRule.DrUnit = unit;
- CurRule->PrDimRule.DrAttr = LatestNumberAttr;
- CurRule->PrDimRule.DrValue = LatestNumber;
- }
- break;
- default:
- break;
- }
- }
- LatestNumber = 0;
- LatestNumberAttr = False;
- PrevSign = 1;
- CurUnit = FontHeight;
- }
- /*----------------------------------------------------------------------
- NewAttrPRule allocation et initialisation d'une structure
- AttributePres en fonction de l'attribut de numero att
- ----------------------------------------------------------------------*/
- static AttributePres *NewAttrPRule (int att)
- {
- AttributePres *pPRuleA;
- NumAttrCase *pAttrCase;
- int j;
- GetAttributePres (&pPRuleA);
- if (pPRuleA)
- {
- /* selon le type de l'attribut */
- switch (pSSchema->SsAttribute->TtAttr[att - 1]->AttrType)
- {
- case AtNumAttr:
- pPRuleA->ApNCases = 0;
- for (j = 0; j < MAX_PRES_ATTR_CASE; j++)
- {
- pAttrCase = &pPRuleA->ApCase[j];
- pAttrCase->CaComparType = ComparConstant;
- pAttrCase->CaLowerBound = -MAX_INT_ATTR_VAL - 1;
- pAttrCase->CaUpperBound = MAX_INT_ATTR_VAL + 1;
- pAttrCase->CaFirstPRule = NULL;
- }
- break;
- case AtTextAttr:
- pPRuleA->ApString = NULL;
- pPRuleA->ApTextFirstPRule = NULL;
- break;
- case AtReferenceAttr:
- pPRuleA->ApRefFirstPRule = NULL;
- break;
- case AtEnumAttr:
- for (j = 0; j <= MAX_ATTR_VAL; j++)
- pPRuleA->ApEnumFirstPRule[j] = NULL;
- break;
- default:
- break;
- }
- }
- else
- /* memoire insuffisante */
- CompilerMessage (0, PRS, FATAL, NO_MORE_MEM_LEFT, inputLine, LineNum);
- pPSchema->PsNAttrPRule->Num[att - 1] += 1;
- return (pPRuleA);
- }
- /*----------------------------------------------------------------------
- GenerateRPresAttribute alloue eventuellement une nouvelle
- structure AttributePres et initialise la regle concernee
- ----------------------------------------------------------------------*/
- static void GenerateRPresAttribute (indLine wi)
- {
- AttributePres *pPRuleA;
- NumAttrCase *pAttrCase;
- int l;
- PtrPRule pPRule;
- /* s'il n'y a pas de structure AttributePres, on en alloue une */
- if (pPSchema->PsNAttrPRule->Num[CurAttrNum - 1] == 0)
- {
- pPRuleA = pPSchema->PsAttrPRule->AttrPres[CurAttrNum - 1]
- = NewAttrPRule (CurAttrNum);
- if (CurElemHeritAttr)
- {
- pPSchema->PsNInheritedAttrs->Num[CurElemHeritAttr - 1] += 1;
- pPSchema->PsNHeirElems->Num[CurAttrNum - 1] += 1;
- }
- }
- else
- /* sinon on cherche s'il y en a une qui traite deja certaines regles
- de l'element CurElemHeritAttr */
- {
- pPRuleA = pPSchema->PsAttrPRule->AttrPres[CurAttrNum - 1];
- for (l = pPSchema->PsNAttrPRule->Num[CurAttrNum - 1]; --l > 0;
- pPRuleA = pPRuleA->ApNextAttrPres)
- if (!CurTextDefined)
- if (pPRuleA->ApElemType == CurElemHeritAttr)
- break;
- /* si on n'a pas touve, on alloue un paquet suivant */
- if (pPRuleA->ApElemType != CurElemHeritAttr || CurTextDefined)
- {
- pPRuleA->ApNextAttrPres = NewAttrPRule (CurAttrNum);
- pPRuleA = pPRuleA->ApNextAttrPres;
- if (CurElemHeritAttr)
- {
- pPSchema->PsNInheritedAttrs->Num[CurElemHeritAttr - 1] += 1;
- pPSchema->PsNHeirElems->Num[CurAttrNum - 1] += 1;
- }
- }
- }
- CurAttrPRule = pPRuleA;
- /* maintenant on remplit les champs dans pPRuleA */
- pPRuleA->ApElemType = CurElemHeritAttr;
- pPRuleA->ApElemInherits = CurElemHeritAttrSelf;
- switch (pSSchema->SsAttribute->TtAttr[CurAttrNum - 1]->AttrType)
- {
- case AtNumAttr:
- /* c'est un attribut a valeur numerique */
- if (pPRuleA->ApNCases >= MAX_PRES_ATTR_CASE)
- /* trop de cas pour cet attribut */
- CompilerMessage (wi, PRS, FATAL, MAX_CASES_IN_ATTR_OVERFLOW,
- inputLine, LineNum);
- else
- {
- pAttrCase = &pPRuleA->ApCase[pPRuleA->ApNCases++];
- if (CurComparAttr == 0)
- /* on utilise des constantes pour comparer */
- {
- pAttrCase->CaComparType = ComparConstant;
- pAttrCase->CaLowerBound = CurAttrLowerBound;
- pAttrCase->CaUpperBound = CurAttrUpperBound;
- }
- else
- /* on utilise un numero d'attribut */
- {
- if (CurElemHeritAttr == 0)
- pPSchema->PsNComparAttrs->Num[CurComparAttr - 1] += 1;
- /* ATTENTION ce n'est donc pas le vrai nombre
- d'attributs se comparant a CurComparAttr
- puisqu'on fait +1 a chaque fois */
- pAttrCase->CaComparType = ComparAttr;
- if (VCondGreater)
- /* attr GREATER MinValAttrName */
- {
- pAttrCase->CaLowerBound = CurComparAttr;
- pAttrCase->CaUpperBound = -1;
- }
- else if (VCondLess)
- /* attr LESS MaxValAttrName */
- {
- pAttrCase->CaLowerBound = -1;
- pAttrCase->CaUpperBound = CurComparAttr;
- }
- else
- /* attr EQUAL EqValAttrName */
- {
- pAttrCase->CaLowerBound = CurComparAttr;
- pAttrCase->CaUpperBound = CurComparAttr;
- }
- }
- pAttrCase->CaFirstPRule = NextRule;
- FirstRule = NextRule;
- }
- break;
- case AtTextAttr:
- if (CurTextDefined)
- pPRuleA->ApString = TtaStrdup ((char *)CurTextEqual);
- else
- pPRuleA->ApString = NULL;
- CurTextDefined = False;
- CurTextEqual[0] = EOS;
- pPRuleA->ApTextFirstPRule = NextRule;
- FirstRule = NextRule;
- break;
- case AtReferenceAttr:
- if (pPRuleA->ApRefFirstPRule != NULL)
- /* ce bloc a deja des regles */
- {
- pPRule = pPRuleA->ApRefFirstPRule;
- do
- {
- if (!pPRule->PrDuplicate)
- /* ce bloc a une regle non dupliquee. C'est une erreur */
- {
- CompilerMessage (wi, PRS, FATAL, CANT_REDEFINE, inputLine,
- LineNum);
- pPRule = NULL;
- }
- else
- {
- /* cherche la derniere regle du bloc */
- if (pPRule->PrNextPRule)
- pPRule = pPRule->PrNextPRule;
- else
- {
- /* c'est la derniere regle, ajoute la nouvelle apres */
- pPRule->PrNextPRule = NextRule;
- pPRule = NULL;
- }
- }
- }
- while (pPRule);
-
- }
- else
- {
- pPRuleA->ApRefFirstPRule = NextRule;
- FirstRule = NextRule;
- }
- break;
- case AtEnumAttr:
- if (pPRuleA->ApEnumFirstPRule[CurAttrVal] != NULL)
- /* ce bloc a deja des regles */
- {
- pPRule = pPRuleA->ApEnumFirstPRule[CurAttrVal];
- do
- {
- if (!pPRule->PrDuplicate)
- /* ce bloc a une regle non dupliquee. C'est une erreur */
- {
- CompilerMessage (wi, PRS, FATAL, CANT_REDEFINE, inputLine,
- LineNum);
- pPRule = NULL;
- }
- else
- {
- /* cherche la derniere regle du bloc */
- if (pPRule->PrNextPRule)
- pPRule = pPRule->PrNextPRule;
- else
- {
- /* c'est la derniere regle, ajoute la nouvelle apres */
- pPRule->PrNextPRule = NextRule;
- pPRule = NULL;
- }
- }
- }
- while (pPRule);
- }
- else
- {
- pPRuleA->ApEnumFirstPRule[CurAttrVal] = NextRule;
- FirstRule = NextRule;
- }
- break;
- default:
- break;
- }
- NewAttributeDef = False;
- }
- /*----------------------------------------------------------------------
- PageCounterChangeBox Cherche les compteurs de page pour la vue
- pageView et indique dans ces compteurs que la boite de numero
- boxNum peut etre modifiee par ces compteurs.
- ----------------------------------------------------------------------*/
- static void PageCounterChangeBox (int boxNum, int pageView)
- {
- int counter;
- int item;
- Counter *pCntr;
- /* parcourt tous les compteurs du schema de presentation */
- for (counter = 0; counter < pPSchema->PsNCounters; counter++)
- {
- pCntr = &pPSchema->PsCounter[counter];
- for (item = 0; item < pCntr->CnNItems; item++)
- if (pCntr->CnItem[item].CiElemType == PageBreak + 1)
- if (pCntr->CnItem[item].CiViewNum == pageView)
- /* C'est un compteur de pages pour la vue voulue */
- if (pCntr->CnNPresBoxes < MAX_PRES_COUNT_USER)
- {
- pCntr->CnNPresBoxes++;
- pCntr->CnPresBox[pCntr->CnNPresBoxes - 1] = boxNum;
- }
- }
- }
- /*----------------------------------------------------------------------
- DuplicateAttrCondRule
- If the current presentation rule has a condition involving an attribute,
- create a copy of that rule for that attribute.
- When the ATTRIBUTES section of a P schema contains:
- attrA (elem) = valA
- BEGIN
- ...
- if attrB = valB Rule;
- ...
- END;
- this function generates in addition the equivalent of:
- attrB = valB
- if elem and inherited attrA = valA Rule;
- This will allow the user to change either attrA or AttrB and have the
- editor to apply and unapply the Rule correctly.
- ----------------------------------------------------------------------*/
- static void DuplicateAttrCondRule (PtrPRule pRule)
- {
- PtrCondition pCond, pCond2;
- AttributePres *pPRuleAttr;
- PtrPRule pRule2, *PtrPtrPRule, prevPRule;
- ThotBool found;
- pCond = pRule->PrCond;
- PtrPtrPRule = NULL;
- if (pCond)
- {
- if (pCond->CoCondition == PcAttribute && !pCond->CoTarget &&
- pCond->CoNotNegative && !pCond->CoNextCondition)
- {
- if (pPSchema->PsNAttrPRule->Num[pCond->CoTypeAttr - 1] == 0)
- pPRuleAttr = pPSchema->PsAttrPRule->AttrPres[pCond->CoTypeAttr - 1] =
- NewAttrPRule (pCond->CoTypeAttr);
- else
- {
- found = FALSE;
- pPRuleAttr = pPSchema->PsAttrPRule->AttrPres[pCond->CoTypeAttr - 1];
- while (pPRuleAttr && !found)
- {
- if (pPRuleAttr->ApElemType == 0)
- {
- if (pSSchema->SsAttribute->TtAttr[pCond->CoTypeAttr - 1]->AttrType != AtTextAttr)
- found = TRUE;
- else
- {
- if (!pCond->CoTestAttrValue && pPRuleAttr->ApString == NULL)
- found = TRUE;
- else if (!strcmp(pPRuleAttr->ApString, pCond->CoAttrTextValue))
- found = TRUE;
- }
- }
- if (!found)
- pPRuleAttr = pPRuleAttr->ApNextAttrPres;
- }
- /* si on n'a pas touve, on alloue un paquet suivant */
- if (!found)
- {
- pPRuleAttr->ApNextAttrPres = NewAttrPRule (pCond->CoTypeAttr);
- pPRuleAttr = pPRuleAttr->ApNextAttrPres;
- }
- }
- switch (pSSchema->SsAttribute->TtAttr[pCond->CoTypeAttr - 1]->AttrType)
- {
- case AtNumAttr:
- pPRuleAttr->ApNCases++;
- pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaComparType =
- ComparConstant;
- if (!pCond->CoTestAttrValue)
- {
- pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaLowerBound =
- -MAX_INT_ATTR_VAL - 1;
- pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaUpperBound =
- MAX_INT_ATTR_VAL + 1;
- }
- else
- {
- pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaLowerBound =
- pCond->CoAttrValue;
- pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaUpperBound =
- pCond->CoAttrValue;
- }
- PtrPtrPRule = &pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaFirstPRule;
- break;
- case AtTextAttr:
- if (pCond->CoTestAttrValue)
- pPRuleAttr->ApString = TtaStrdup ((char *)pCond->CoAttrTextValue);
- else
- pPRuleAttr->ApString = NULL;
- PtrPtrPRule = &pPRuleAttr->ApTextFirstPRule;
- break;
- case AtReferenceAttr:
- PtrPtrPRule = &pPRuleAttr->ApRefFirstPRule;
- break;
- case AtEnumAttr:
- if (!pCond->CoTestAttrValue)
- PtrPtrPRule = &pPRuleAttr->ApEnumFirstPRule[0];
- else
- PtrPtrPRule = &pPRuleAttr->ApEnumFirstPRule[pCond->CoAttrValue];
- break;
- }
- GetPresentRule (&pRule2);
- *pRule2 = *pRule;
- prevPRule = *PtrPtrPRule;
- *PtrPtrPRule = pRule2;
- pRule2->PrNextPRule = prevPRule;
- pRule2->PrDuplicate = TRUE;
- GetPresentRuleCond (&pCond2);
- pRule2->PrCond = pCond2;
- pCond2->CoNextCondition = NULL;
- if (CurAttrPRule->ApElemType > 0)
- pCond2->CoCondition = PcInheritAttribute;
- else
- pCond2->CoCondition = PcAttribute;
- pCond2->CoNotNegative = TRUE;
- pCond2->CoTarget = FALSE;
- pCond2->CoTypeAttr = CurAttrNum;
- switch (pSSchema->SsAttribute->TtAttr[CurAttrNum - 1]->AttrType)
- {
- case AtNumAttr:
- pCond2->CoTestAttrValue = FALSE;
- if (CurAttrPRule->ApCase[0].CaComparType == ComparConstant)
- if (CurAttrPRule->ApCase[0].CaLowerBound ==
- CurAttrPRule->ApCase[0].CaUpperBound)
- {
- pCond2->CoTestAttrValue = TRUE;
- pCond2->CoAttrValue = CurAttrPRule->ApCase[0].CaUpperBound;
- }
- PtrPtrPRule = &pPRuleAttr->ApCase[pPRuleAttr->ApNCases -1].CaFirstPRule;
- pCond2->CoTestAttrValue = TRUE;
- break;
- case AtTextAttr:
- if (CurAttrPRule->ApString == NULL)
- pCond2->CoTestAttrValue = FALSE;
- else
- {
- pCond2->CoTestAttrValue = TRUE;
- pCond->CoAttrTextValue = TtaStrdup ((char *)CurAttrPRule->ApString);
- }
- break;
- case AtReferenceAttr:
- break;
- case AtEnumAttr:
- if (CurAttrPRule->ApEnumFirstPRule[0] == pRule)
- pCond2->CoTestAttrValue = FALSE;
- else
- {
- pCond2->CoTestAttrValue = TRUE;
- pCond2->CoAttrValue = CurAttrVal;
- }
- break;
- }
- if (CurAttrPRule->ApElemType > 0)
- {
- GetPresentRuleCond (&pCond2->CoNextCondition);
- pCond2 = pCond2->CoNextCondition;
- pCond2->CoNextCondition = NULL;
- pCond2->CoCondition = PcElemType;
- pCond2->CoNotNegative = TRUE;
- pCond2->CoTarget = FALSE;
- pCond2->CoTypeElem = CurAttrPRule->ApElemType;
- }
- }
- }
- }
- /*----------------------------------------------------------------------
- ProcessShortKeyWord
- ----------------------------------------------------------------------*/
- static void ProcessShortKeyWord (int x, indLine wi, SyntacticCode gCode)
- {
- PresVariable *pPresVar;
- /* traitement selon le code du mot-cle court */
- switch (x)
- {
- case CHR_59:
- /* ; */
- if (gCode == RULE_Rule)
- /* fin d'une regle */
- {
- if (CurRule != NULL)
- if (CurRule->PrType == PtBreak1 ||
- CurRule->PrType == PtBreak2 ||
- CurRule->PrType == PtIndent ||
- CurRule->PrType == PtVertRef ||
- CurRule->PrType == PtHorizRef ||
- CurRule->PrType == PtVertPos ||
- CurRule->PrType == PtHorizPos ||
- CurRule->PrType == PtHeight ||
- CurRule->PrType == PtWidth ||
- CurRule->PrType == PtLineSpacing ||
- CurRule->PrType == PtLineWeight ||
- CurRule->PrType == PtMarginTop ||
- CurRule->PrType == PtMarginRight ||
- CurRule->PrType == PtMarginBottom ||
- CurRule->PrType == PtMarginLeft ||
- CurRule->PrType == PtPaddingTop ||
- CurRule->PrType == PtPaddingRight ||
- CurRule->PrType == PtPaddingBottom ||
- CurRule->PrType == PtPaddingLeft ||
- CurRule->PrType == PtBorderTopWidth ||
- CurRule->PrType == PtBorderRightWidth ||
- CurRule->PrType == PtBorderBottomWidth ||
- CurRule->PrType == PtBorderLeftWidth)
- EndOfNumber ();
- InInLineRule = False;
- /* verifie la validite des regles de dimensionnement relatif */
- /* au contenu */
- if (CurRule != NULL)
- if (CurRule->PrType == PtHeight || CurRule->PrType == PtWidth)
- if (!CurRule->PrDimRule.DrPosition)
- if (!CurRule->PrDimRule.DrAbsolute)
- if (CurRule->PrDimRule.DrRelation == RlEnclosed)
- if (CurRule->PrDimRule.DrRefIdent != 0 ||
- CurRule->PrDimRule.DrValue !=…
Large files files are truncated, but you can click here to view the full file