diff options
Diffstat (limited to 'graphics/mcf2graph/mcf2graph.mp')
-rw-r--r-- | graphics/mcf2graph/mcf2graph.mp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/graphics/mcf2graph/mcf2graph.mp b/graphics/mcf2graph/mcf2graph.mp index 85e83b888d..dfa85f00e2 100644 --- a/graphics/mcf2graph/mcf2graph.mp +++ b/graphics/mcf2graph/mcf2graph.mp @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 5.00 Copyright (c) 2013-2023 Akira Yamaji +% mcf2graph ver 5.01 Copyright (c) 2013-2023 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, @@ -30,7 +30,7 @@ % Set output MOL file (V3000) : mpost -s ahlength=6 FILENAME % Set output report : mpost -s ahlength=7 FILENAME %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -message "* This is mcf2graph ver 5.00 2023.05.07"; +message "* This is mcf2graph ver 5.01 2023.05.15"; tracingstats:=1; prologues:=3; warningcheck:=0; %------------------------------------------------------------------------------------------------- newinternal string EN_; @@ -44,10 +44,9 @@ string row[][],save_str[],tbl_atom_str[],str_tbl[],arg_s[],mc[],ex[],ad[],op[], pair save_pair[],msize,mposition,fsize,fmargin,dum,save_mposition; %------------------------------------------------------------------------------------------------- fig_num:=str_cnt:=tbl_cnt:=mangle:=sw_expand:=sw_frame:=sw_trimming:=sw_ext_all:=sw_abbreviate:=0; -sw_comment:=sw_output:=sw_numbering:=0; numbering_start:=1; numbering_end:=4095; +sw_comment:=sw_output:=sw_numbering:=tag_cnt:=0; numbering_start:=1; numbering_end:=4095; %------------------------------------------------------------------------------------------------- aux_delimiter:=";"; blanks:= " "; dum:=(-4091,0); -tag_cnt:=0; for s="No","EN","JN","MW","MI","FM","CAT","CAS","USE","EXA","EXB": tag[incr tag_cnt]:=s; endfor Fig:=1; Mcode:=2; Calc:=4; Info:=8; Table:=16; Report:=32; MOL2k:=64; MOL3k:=128; Atom:=8; Bond:=16; Group:=32; Mol:=64; Outside:=1; Inside:=2; Bothside:=Outside+Inside; @@ -270,7 +269,7 @@ def getm(expr a)=if string a: read_unit(get_adr("EN",a)) ef numeric a: read_unit %------------------------------------------------------------------------------------------------- def read_unit(expr n)= save nF; nF:=0; - if (n>=1)and(n<=unitcount): + if (n>=1)and(n<=ucount): for i=1 upto info[n]: for j=1 upto tag_cnt: if lib_tag[n][i]=tag[j]: scantokens(tag[j]):=lib_val[n][i]; fi endfor endfor @@ -293,7 +292,7 @@ enddef; %================================================================================================= vardef get_adr(expr t,v)= save adr_n; adr_n:=0; - for n=1 upto unitcount: + for n=1 upto ucount: for i=1 upto info[n]: for j=1 upto tag_cnt: if (lib_tag[n][i]=t)and(lib_val[n][i]=v): adr_n:=n; fi endfor exitif adr_n>=1; @@ -584,7 +583,7 @@ vardef lone_pair_add expr n= image(draw (0,0) wpcs lonepairdiam; draw ((0,lonepairspace) rotated n) wpcs lonepairdiam;) enddef; %================================================================================================= -def cv_at(expr w,h)(text t)= +def cvat(expr w,h)(text t)= save_mposition:=mposition; mposition:=(w,h); cv(t) mposition:=save_mposition; enddef; %------------------------------------------------------------------------------------------------- def cv(text t)= @@ -1503,7 +1502,7 @@ enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def savem(expr s)= file_output:=s; - for i=1 upto unitcount: for j=1 upto unit_lines[i]: printf row[i][j]; endfor endfor + for i=1 upto ucount: for j=1 upto unit_lines[i]: printf row[i][j]; endfor endfor closefrom file_output; enddef; %------------------------------------------------------------------------------------------------- @@ -1585,10 +1584,10 @@ def loadm(text s)= fi fi endfor - unitcount:=unit_cnt:=unit_cnt-1; + ucount:=unit_cnt:=unit_cnt-1; %============================================================================================= message "* Input : "&file_input&" ["&decimal(lib_unit_cnt)&"]"; - message "* Output : unitcount ["&decimal(unitcount)&"]"; + message "* Output : ucount ["&decimal(ucount)&"]"; if filter_cnt>=1: for i=1 upto filter_cnt: message "* Filter("&decimal(i)&"): "&filter_tag[i]&" "&sign_s[filter_sign[i]]&filter_var[i]; |