| 1 | 1 |
#!/bin/bash |
| 2 | 2 |
|
| 3 | 3 |
set -e |
| 4 | 4 |
|
| 5 | 5 |
if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then |
| 6 | 6 |
echo "Usage:" |
| 7 | 7 |
echo " $0 source-file(s)" |
| 8 | 8 |
exit |
| 9 | 9 |
fi |
| 10 | 10 |
|
| 11 | 11 |
for i in $@ |
| 12 | 12 |
do |
| 13 | 13 |
echo Update $i... |
| 14 | 14 |
TMP=`mktemp` |
| 15 | 15 |
sed -e "s/\<undirected graph\>/_gr_aph_label_/g"\ |
| 16 | 16 |
-e "s/\<undirected graphs\>/_gr_aph_label_s/g"\ |
| 17 | 17 |
-e "s/\<undirected edge\>/_ed_ge_label_/g"\ |
| 18 | 18 |
-e "s/\<undirected edges\>/_ed_ge_label_s/g"\ |
| 19 | 19 |
-e "s/\<directed graph\>/_digr_aph_label_/g"\ |
| 20 | 20 |
-e "s/\<directed graphs\>/_digr_aph_label_s/g"\ |
| 21 | 21 |
-e "s/\<directed edge\>/_ar_c_label_/g"\ |
| 22 | 22 |
-e "s/\<directed edges\>/_ar_c_label_s/g"\ |
| 23 | 23 |
-e "s/UGraph/_Gr_aph_label_/g"\ |
| 24 | 24 |
-e "s/u[Gg]raph/_gr_aph_label_/g"\ |
| 25 | 25 |
-e "s/Graph\>/_Digr_aph_label_/g"\ |
| 26 | 26 |
-e "s/\<graph\>/_digr_aph_label_/g"\ |
| 27 | 27 |
-e "s/Graphs\>/_Digr_aph_label_s/g"\ |
| 28 | 28 |
-e "s/\<graphs\>/_digr_aph_label_s/g"\ |
| 29 | 29 |
-e "s/\([Gg]\)raph\([a-z]\)/_\1r_aph_label_\2/g"\ |
| 30 | 30 |
-e "s/\([a-z_]\)graph/\1_gr_aph_label_/g"\ |
| 31 | 31 |
-e "s/Graph/_Digr_aph_label_/g"\ |
| 32 | 32 |
-e "s/graph/_digr_aph_label_/g"\ |
| 33 | 33 |
-e "s/UEdge/_Ed_ge_label_/g"\ |
| 34 | 34 |
-e "s/u[Ee]dge/_ed_ge_label_/g"\ |
| 35 | 35 |
-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\ |
| 36 | 36 |
-e "s/Edge\>/_Ar_c_label_/g"\ |
| 37 | 37 |
-e "s/\<edge\>/_ar_c_label_/g"\ |
| 38 | 38 |
-e "s/_edge\>/_ar_c_label_/g"\ |
| 39 | 39 |
-e "s/Edges\>/_Ar_c_label_s/g"\ |
| 40 | 40 |
-e "s/\<edges\>/_ar_c_label_s/g"\ |
| 41 | 41 |
-e "s/_edges\>/_ar_c_label_s/g"\ |
| 42 | 42 |
-e "s/\([Ee]\)dge\([a-z]\)/_\1d_ge_label_\2/g"\ |
| 43 | 43 |
-e "s/\([a-z]\)edge/\1_ed_ge_label_/g"\ |
| 44 | 44 |
-e "s/Edge/_Ar_c_label_/g"\ |
| 45 | 45 |
-e "s/edge/_ar_c_label_/g"\ |
| 46 | 46 |
-e "s/A[Nn]ode/_Re_d_label_/g"\ |
| 47 | 47 |
-e "s/B[Nn]ode/_Blu_e_label_/g"\ |
| 48 | 48 |
-e "s/A-[Nn]ode/_Re_d_label_/g"\ |
| 49 | 49 |
-e "s/B-[Nn]ode/_Blu_e_label_/g"\ |
| 50 | 50 |
-e "s/a[Nn]ode/_re_d_label_/g"\ |
| 51 | 51 |
-e "s/b[Nn]ode/_blu_e_label_/g"\ |
| 52 | 52 |
-e "s/\<UGRAPH_TYPEDEFS\([ \t]*([ \t]*\)typename[ \t]/TEMPLATE__GR_APH_TY_PEDE_FS_label_\1/g"\ |
| 53 | 53 |
-e "s/\<GRAPH_TYPEDEFS\([ \t]*([ \t]*\)typename[ \t]/TEMPLATE__DIGR_APH_TY_PEDE_FS_label_\1/g"\ |
| 54 | 54 |
-e "s/\<UGRAPH_TYPEDEFS\>/_GR_APH_TY_PEDE_FS_label_/g"\ |
| 55 | 55 |
-e "s/\<GRAPH_TYPEDEFS\>/_DIGR_APH_TY_PEDE_FS_label_/g"\ |
| 56 | 56 |
-e "s/_Digr_aph_label_/Digraph/g"\ |
| 57 | 57 |
-e "s/_digr_aph_label_/digraph/g"\ |
| 58 | 58 |
-e "s/_Gr_aph_label_/Graph/g"\ |
| 59 | 59 |
-e "s/_gr_aph_label_/graph/g"\ |
| 60 | 60 |
-e "s/_Ar_c_label_/Arc/g"\ |
| 61 | 61 |
-e "s/_ar_c_label_/arc/g"\ |
| 62 | 62 |
-e "s/_Ed_ge_label_/Edge/g"\ |
| 63 | 63 |
-e "s/_ed_ge_label_/edge/g"\ |
| 64 | 64 |
-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\ |
| 65 | 65 |
-e "s/_Re_d_label_/Red/g"\ |
| 66 | 66 |
-e "s/_Blu_e_label_/Blue/g"\ |
| 67 | 67 |
-e "s/_re_d_label_/red/g"\ |
| 68 | 68 |
-e "s/_blu_e_label_/blue/g"\ |
| 69 | 69 |
-e "s/_GR_APH_TY_PEDE_FS_label_/GRAPH_TYPEDEFS/g"\ |
| 70 | 70 |
-e "s/_DIGR_APH_TY_PEDE_FS_label_/DIGRAPH_TYPEDEFS/g"\ |
| 71 | 71 |
-e "s/DigraphToEps/GraphToEps/g"\ |
| 72 | 72 |
-e "s/digraphToEps/graphToEps/g"\ |
| 73 | 73 |
-e "s/\<DefPredMap\>/SetPredMap/g"\ |
| 74 | 74 |
-e "s/\<DefDistMap\>/SetDistMap/g"\ |
| 75 | 75 |
-e "s/\<DefReachedMap\>/SetReachedMap/g"\ |
| 76 | 76 |
-e "s/\<DefProcessedMap\>/SetProcessedMap/g"\ |
| 77 | 77 |
-e "s/\<DefHeap\>/SetHeap/g"\ |
| 78 | 78 |
-e "s/\<DefStandardHeap\>/SetStandradHeap/g"\ |
| 79 | 79 |
-e "s/\<DefOperationTraits\>/SetOperationTraits/g"\ |
| 80 | 80 |
-e "s/\<DefProcessedMapToBeDefaultMap\>/SetStandardProcessedMap/g"\ |
| 81 | 81 |
-e "s/\<copyGraph\>/graphCopy/g"\ |
| 82 | 82 |
-e "s/\<copyDigraph\>/digraphCopy/g"\ |
| 83 | 83 |
-e "s/\<HyperCubeDigraph\>/HypercubeGraph/g"\ |
| 84 | 84 |
-e "s/\<IntegerMap\>/RangeMap/g"\ |
| 85 | 85 |
-e "s/\<integerMap\>/rangeMap/g"\ |
| 86 | 86 |
-e "s/\<\([sS]\)tdMap\>/\1parseMap/g"\ |
| 87 | 87 |
-e "s/\<\([Ff]\)unctorMap\>/\1unctorToMap/g"\ |
| 88 | 88 |
-e "s/\<\([Mm]\)apFunctor\>/\1apToFunctor/g"\ |
| 89 | 89 |
-e "s/\<\([Ff]\)orkWriteMap\>/\1orkMap/g"\ |
| 90 | 90 |
-e "s/\<StoreBoolMap\>/LoggerBoolMap/g"\ |
| 91 | 91 |
-e "s/\<storeBoolMap\>/loggerBoolMap/g"\ |
| 92 |
-e "s/\<InvertableMap\>/CrossRefMap/g"\ |
|
| 93 |
-e "s/\<invertableMap\>/crossRefMap/g"\ |
|
| 94 |
-e "s/\<DescriptorMap\>/RangeIdMap/g"\ |
|
| 95 |
-e "s/\<descriptorMap\>/rangeIdMap/g"\ |
|
| 92 | 96 |
-e "s/\<BoundingBox\>/Box/g"\ |
| 93 | 97 |
-e "s/\<readNauty\>/readNautyGraph/g"\ |
| 94 | 98 |
-e "s/\<RevDigraphAdaptor\>/ReverseDigraph/g"\ |
| 95 | 99 |
-e "s/\<revDigraphAdaptor\>/reverseDigraph/g"\ |
| 96 | 100 |
-e "s/\<SubDigraphAdaptor\>/SubDigraph/g"\ |
| 97 | 101 |
-e "s/\<subDigraphAdaptor\>/subDigraph/g"\ |
| 98 | 102 |
-e "s/\<SubGraphAdaptor\>/SubGraph/g"\ |
| 99 | 103 |
-e "s/\<subGraphAdaptor\>/subGraph/g"\ |
| 100 | 104 |
-e "s/\<NodeSubDigraphAdaptor\>/FilterNodes/g"\ |
| 101 | 105 |
-e "s/\<nodeSubDigraphAdaptor\>/filterNodes/g"\ |
| 102 | 106 |
-e "s/\<ArcSubDigraphAdaptor\>/FilterArcs/g"\ |
| 103 | 107 |
-e "s/\<arcSubDigraphAdaptor\>/filterArcs/g"\ |
| 104 | 108 |
-e "s/\<UndirDigraphAdaptor\>/Undirector/g"\ |
| 105 | 109 |
-e "s/\<undirDigraphAdaptor\>/undirector/g"\ |
| 106 | 110 |
-e "s/\<ResDigraphAdaptor\>/ResidualDigraph/g"\ |
| 107 | 111 |
-e "s/\<resDigraphAdaptor\>/residualDigraph/g"\ |
| 108 | 112 |
-e "s/\<SplitDigraphAdaptor\>/SplitNodes/g"\ |
| 109 | 113 |
-e "s/\<splitDigraphAdaptor\>/splitNodes/g"\ |
| 110 | 114 |
-e "s/\<SubGraphAdaptor\>/SubGraph/g"\ |
| 111 | 115 |
-e "s/\<subGraphAdaptor\>/subGraph/g"\ |
| 112 | 116 |
-e "s/\<NodeSubGraphAdaptor\>/FilterNodes/g"\ |
| 113 | 117 |
-e "s/\<nodeSubGraphAdaptor\>/filterNodes/g"\ |
| 114 | 118 |
-e "s/\<ArcSubGraphAdaptor\>/FilterEdges/g"\ |
| 115 | 119 |
-e "s/\<arcSubGraphAdaptor\>/filterEdges/g"\ |
| 116 | 120 |
-e "s/\<DirGraphAdaptor\>/Orienter/g"\ |
| 117 | 121 |
-e "s/\<dirGraphAdaptor\>/orienter/g"\ |
| 118 | 122 |
-e "s/\<LpCplex\>/CplexLp/g"\ |
| 119 | 123 |
-e "s/\<MipCplex\>/CplexMip/g"\ |
| 120 | 124 |
-e "s/\<LpGlpk\>/GlpkLp/g"\ |
| 121 | 125 |
-e "s/\<MipGlpk\>/GlpkMip/g"\ |
| 122 | 126 |
-e "s/\<LpSoplex\>/SoplexLp/g"\ |
| 123 | 127 |
<$i > $TMP |
| 124 | 128 |
mv $TMP $i |
| 125 | 129 |
done |
0 comments (0 inline)