OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_11/usb_fpga_1_11/trunk

Subversion Repositories usb_fpga_1_11

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /usb_fpga_1_11/trunk/bmp/src
    from Rev 2 to Rev 5
    Reverse comparison

Rev 2 → Rev 5

/bmpsys.pas
1,6 → 1,6
{*!
bmp -- babel macro processor
Copyright (C) 2009-2010 ZTEX e.K.
Copyright (C) 2009-2011 ZTEX GmbH.
http://www.ztex.de
 
This program is free software; you can redistribute it and/or modify
/bmp.pas
1,6 → 1,6
{*!
bmp -- babel macro processor
Copyright (C) 2009-2010 ZTEX e.K.
Copyright (C) 2009-2011 ZTEX GmbH.
http://www.ztex.de
 
This program is free software; you can redistribute it and/or modify
56,6 → 56,9
exactcase
 
noexpand
 
disablelineinfo disables line info for next define
}
 
{$mode objfpc}
425,6 → 428,8
ifli : array[0..maxifs] of dword;
bli : array[0..maxbs] of dword;
 
disablelineinfo : boolean;
 
label endparse;
 
begin
449,6 → 454,7
ifc:=-1;
outfile:=1;
bm_expand:=bm_plain;
disablelineinfo:=false;
 
prevli:=dword(-1);
ampos:=0;
839,6 → 845,10
for i:=1 to macros[lastmacro]^.pn-1 do
if macros[lastmacro]^.paramsep[i]='' then macros[lastmacro]^.paramsep[i]:=bc_cb+bc_ob;
lastmodestr1(bm_def_scb3, macros[lastmacro]^.rsize, macros[lastmacro]^.r, macros[lastmacro]^.li);
if disablelineinfo then
for i:=0 to macros[lastmacro]^.rsize-1 do
macros[lastmacro]^.li[i]:=macros[lastmacro]^.li[i] or 2048;
disablelineinfo:=false;
end;
if (mode=bm_def_scbu) and (bl=0) then
begin
1011,6 → 1021,7
if matchstr(bc_pm+'enableout',bm_pm) then bufm[rbp]:=bm_outfile_a+1;
if matchstr(bc_pm+'ignorecase',bm_pm) then bp_icase:=true;
if matchstr(bc_pm+'exactcase',bm_pm) then bp_icase:=false;
if matchstr(bc_pm+'disablelineinfo',bm_pm) then disablelineinfo:=true;
end;
 
{expanding mode}
/textbuf.pas
1,6 → 1,6
{*!
bmp -- babel macro processor
Copyright (C) 2009-2010 ZTEX e.K.
Copyright (C) 2009-2011 ZTEX GmbH.
http://www.ztex.de
 
This program is free software; you can redistribute it and/or modify
249,8 → 249,8
{ ********************************************************************* }
{ ****** FileCache **************************************************** }
{ ********************************************************************* }
const fileCount : longint = 0;
var fileCache : array[0..4095] of ansistring;
const fileCount : longint = 0;
var fileCache : array[0..2047] of ansistring;
 
{ ****** getFileNum *************************************************** }
function getFileNum(const fn:ansistring):longint;
257,11 → 257,11
var i : longint;
begin
i:=0;
while (i<fileCount) and (i<4096) and (fn<>fileCache[i]) do
while (i<fileCount) and (i<2047) and (fn<>fileCache[i]) do
i+=1;
if fn<>fileCache[i] then
begin
i:=fileCount and 4095;
i:=fileCount and 2047;
fileCache[i]:=fn;
fileCount+=1;
end;
271,7 → 271,7
{ ****** lineInfoStr ************************************************* }
function lineInfoStr(li:dword):ansistring;
begin
result:=fileCache[li and 4095]+'('+int2str((li shr 12)+1)+')';
result:=fileCache[li and 2047]+'('+int2str((li shr 12)+1)+')';
end;
 
procedure lineInfoStr(var fo:text; li:dword);
278,6 → 278,7
var s : ansistring;
i,j : longint;
begin
if li and 2048 <> 0 then exit;
pointer(s):=nil;
i:=1;
while i<=length(lineInfoPattern) do
285,10 → 286,10
if (lineInfoPattern[i]='%') and (i<length(lineInfoPattern))
then case lineInfoPattern[i+1] of
'1' : begin
for j:=1 to length(fileCache[li and 4095]) do
if fileCache[li and 4095][j]='\'
for j:=1 to length(fileCache[li and 2047]) do
if fileCache[li and 2047][j]='\'
then s+='\\'
else s+=fileCache[li and 4095][j];
else s+=fileCache[li and 2047][j];
i+=1;
end;
'2' : begin
307,5 → 308,14
writeln(fo,s);
end;
 
procedure initFileCache;
var i : longint;
begin
fileCache[0]:='?';
for i:=1 to 2047 do
fileCache[i]:=fileCache[0];
end;
 
begin
initFileCache;
end.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.