(* Modul za rad sa polinomima preko listi
   verzija 2014; rev 1 *)
DEFINITION MODULE PolinomL;
TYPE
  Polinom = POINTER TO Monom;
  Monom = RECORD
            k : REAL;
            st : CARDINAL;
            veza : Polinom
          END;

PROCEDURE Anuliraj(VAR p: Polinom);
PROCEDURE Unos(VAR p: Polinom);
PROCEDURE Stampaj(p: Polinom; d: CARDINAL);
PROCEDURE Kopiraj(p: Polinom; 
                  VAR kopija: Polinom);
PROCEDURE PostaviClan(k: REAL; st:CARDINAL; 
                  VAR p:Polinom);
PROCEDURE KoeficijentUz(p:Polinom; st:CARDINAL):REAL;
PROCEDURE MaksimalniStepen(p:Polinom):CARDINAL;
PROCEDURE UbaciMonom(mon:Polinom; 
                     VAR p: Polinom);
PROCEDURE PromeniZnak(VAR p: Polinom);
PROCEDURE Saberi(p1, p2: Polinom; 
                 VAR zbir: Polinom);
PROCEDURE SaberiNa(p: Polinom; VAR rez: Polinom);
PROCEDURE Oduzmi(p1,p2: Polinom; 
                 VAR razlika: Polinom);
PROCEDURE MonomPuta(p, mon: Polinom; 
                    VAR mp : Polinom);
PROCEDURE Puta(p1, p2: Polinom; VAR pr: Polinom);
PROCEDURE Kolicnik(p1, p2: Polinom;
                   VAR kol, ost: Polinom;
                   VAR ok : BOOLEAN);
PROCEDURE PolinomNaN(p: Polinom; n: CARDINAL;
                     VAR rez: Polinom);
PROCEDURE DisposePolinom(VAR p: Polinom);

END PolinomL.
