summaryrefslogtreecommitdiff
path: root/graphics/mcf2graph/mcf2graph.mf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mcf2graph/mcf2graph.mf')
-rw-r--r--graphics/mcf2graph/mcf2graph.mf62
1 files changed, 30 insertions, 32 deletions
diff --git a/graphics/mcf2graph/mcf2graph.mf b/graphics/mcf2graph/mcf2graph.mf
index 5bbd4639dc..bc0dd5d6b6 100644
--- a/graphics/mcf2graph/mcf2graph.mf
+++ b/graphics/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.66 Copyright (c) 2013-2021 Akira Yamaji
+% mcf2graph ver 4.67 Copyright (c) 2013-2021 Akira Yamaji
%
% Permission is hereby granted, free of charge, to any person obtaining a copy of this software
% and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -37,7 +37,7 @@
% Set to use plain.mp (label,arrow,atom) : mpost -s labeloffset=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message "* This is mcf2graph ver 4.66 2021.06.06";
+message "* This is mcf2graph ver 4.67 2021.06.13";
%-------------------------------------------------------------------------------------------------
newinternal cntA,cntB,cntM,minX,minY,maxX,maxY,sftX,sftY,com,par,envT,envB,lenT,lineT,angT,rotT,
crR,nA,nB,nC,nD,nE,nF,nS,nL,nR,nU,nP,xpos,ypos,markA,markB,saveA,saveB,bondL;
@@ -345,23 +345,23 @@ def endfont=
endchar;
clearit;
%-----------------------------------------------------------------------------------------
- if sw_output=(Font+Info+Temp): proc_info_out(3);
- ef sw_output=(Font+Mcode+Temp): proc_mc_out(2);
- ef sw_output=(Font+Info+Mcode+Temp): proc_info_out(3); proc_mc_out(2);
- ef sw_output=(Font+Report+Temp): proc_report_out(2);
+ if sw_output=Font+Info+Temp: proc_info_out(1,1);
+ ef sw_output=Font+Mcode+Temp: proc_mc_out(1);
+ ef sw_output=Font+Info+Mcode+Temp: proc_info_out(1,1); proc_mc_out(1);
+ ef sw_output=Font+Report+Temp: proc_report_out(1);
fi
%-----------------------------------------------------------------------------------------
- ef sw_output=Info: proc_info_out(1);
- ef sw_output=(Info+Table): proc_info_out(2);
- ef sw_output=(Info+Temp): proc_info_out(3);
- ef sw_output=Mcode: proc_mc_out(1);
- ef sw_output=(Mcode+Temp): proc_mc_out(2);
+ ef sw_output=Info: proc_info_out(1,0);
+ ef sw_output=Info+Table: proc_info_out(2,0);
+ ef sw_output=Info+Temp: proc_info_out(1,1);
+ ef sw_output=Mcode: proc_mc_out(0);
+ ef sw_output=Mcode+Temp: proc_mc_out(1);
ef sw_output=Mfont: proc_mf_out(0);
- ef sw_output=Report: proc_report_out(1);
- ef sw_output=(Report+Temp): proc_report_out(2);
+ ef sw_output=Report: proc_report_out(0);
+ ef sw_output=Report+Temp: proc_report_out(1);
ef sw_output=MOL2k: proc_mol_out(1);
ef sw_output=MOL3k: proc_mol_out(2);
- ef sw_output=(Info+Mcode+Temp): proc_info_out(3); proc_mc_out(2);
+ ef sw_output=Info+Mcode+Temp: proc_mc_out(1); proc_info_out(1,1);
fi
%-----------------------------------------------------------------------------------------------
%% message "* parts_cnt (0)="& decimal(parts_cnt) &" "& decimal(parts_usr-parts_usr_start);
@@ -984,12 +984,10 @@ def MC(text TXT)=
mol_stru[cntM]:=currentpicture;
clearit;
endgroup;
- if sw_output>0: proc_calc(0); fi
- if cntC>0:
- for i=1 upto cntA:
- if colorA[i]<>0: colorA[i]:=0; fi
- if colorB[i]<>0: colorB[i]:=0; fi
- endfor
+ if sw_output>=1: proc_calc(0); fi
+ if cntC>=1:
+ for i=1 upto cntA: if colorA[i]<>0: colorA[i]:=0; fi endfor
+ for i=1 upto cntB: if colorB[i]<>0: colorB[i]:=0; fi endfor
fi
enddef;
%-------------------------------------------------------------------------------------------------
@@ -1646,9 +1644,9 @@ def proc_calc(expr n)=
endgroup
enddef;
%=================================================================================================
-def proc_info_out(expr n)=
+def proc_info_out(expr n,f)=
message "["&decimal(char_num)&"]:"&inf_EN;
- if n=3: file_name_output:="temp-info.aux";
+ if f=1: file_name_output:="temp-info.aux";
else: file_name_output:=jobname&"-info.aux";
fi
%--------------------------------------------------------------------------------------
@@ -1658,7 +1656,7 @@ def proc_info_out(expr n)=
%--------------------------------------------------------------------------------------
for i=1 upto aux_max: exitif tag[i]="";
if i=1: printf "" else: &aux_delimiter fi
- if (n=1)or(n=3): &tag[i]&":" fi
+ if n=1: &tag[i]&":" fi
%-------------------------------------------
if tag[i]="J": & jobname
ef tag[i]="C": & decimal(char_num)
@@ -1685,12 +1683,12 @@ def proc_info_out(expr n)=
ef tag[i]="MC": & inf_MC
fi
endfor ;
- if n=3: printf EOF; fi
+ if f=1: printf EOF; fi
enddef;
%=================================================================================================
-def proc_report_out(expr n)=
+def proc_report_out(expr f)=
message "["&decimal(char_num)&"]:"&inf_EN;
- if n=2: file_name_output:="temp-report.aux";
+ if f=1: file_name_output:="temp-report.aux";
else: file_name_output:=jobname&"-report.txt";
fi
printf "===========================================================================";
@@ -1750,7 +1748,7 @@ def proc_report_out(expr n)=
printf " Fomula Calc: "&cal_FM&" / Input: "
if inf_FM<>"-": &inf_FM&" / "& iif(inf_FM=cal_FM,"MACTCH","NOT MACTCH") fi;
printf "===========================================================================";
- if n=2: printf EOF; fi
+ if f=1: printf EOF; fi
enddef;
%-------------------------------------------------------------------------------------------------
vardef round_auto(expr n)=
@@ -1800,7 +1798,7 @@ def proc_mol_out(expr n)=
fi
enddef;
%=================================================================================================
-def proc_mf_out(expr n)=
+def proc_mf_out(expr f)=
message "["&decimal(char_num)&"]:"&inf_EN;
file_name_output:=jobname&"-mf.aux";
printf "beginfont("
@@ -1810,12 +1808,12 @@ def proc_mf_out(expr n)=
endfor
printf "if check(mc)=0: MC(scantokens(mc)) fi";
printf "endfont";
- if n=1: printf "%-------------------------------------------------------------------------"; fi
+ if f=1: printf "%-------------------------------------------------------------------------"; fi
enddef;
%=================================================================================================
-def proc_mc_out(expr n)=
+def proc_mc_out(expr f)=
message "["&decimal(char_num)&"]:"&inf_EN;
- if n=2: file_name_output:="temp-mc.aux";
+ if f=1: file_name_output:="temp-mc.aux";
else: file_name_output:=jobname&"-"&fit_zero(char_num)&"-"&erase_space(inf_EN)&"-mc.aux";
fi
for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blank_str)&mc[i]; endfor
@@ -1908,7 +1906,7 @@ S!:='(S,!); S!2:='(S,!,!); S!3:='(S,!,!,!); S!?!:='(S,!,?!); S!??!:='(S,!,??!);
%-------------------------------------------------------------------------------------------------
COO:='(//O,!,O); COO!:='(COO,!); COO!2:='(COO,!,!); COO!??:='(COO,!,?!); COO!3:='(COO,!,!,!);
CO!:='(//O,!); CO!2:='(//O,!,!); CO!3:='(//O,!,!,!); OCO!:='(O,!,//O,!);
-N?!:='(N!,!); N?!2:='(N!,!,!); NH!:='(NH,!); NH!2:='(NH,!,!); NH!3:='(NH,!,!,!);
+N?!:='(N,!,@-2,0); N?!2:='(N!,!,!); NH!:='(NH,!); NH!2:='(NH,!,!); NH!3:='(NH,!,!,!);
NH!?!:='(NH,!,?!); NHCO!:='(NH,!,//O,!); CONH2:='(//O,!,NH2); ??:='(/_^35,/_^-35);
%-------------------------------------------------------------------------------------------------
!OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2); !CO!:='(!,//O,!); !CO!2:='(!,CO!2); !CO!3:='(!,CO!3);