Lines Matching +full:in +full:- +full:line

6 # Redistribution and use in source and binary forms, with or without
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
19 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 if [ $# -lt 1 ]
45 # XXX - This needs to change if the data structure uses different name
51 case $toggle in
55 *) c="-" ;;
61 # Handle the case where $__ifp__->if_blah = XX;
63 if echo $line | grep "$__ifp__->.* = " > /dev/null 2>&1
65 if echo $line | grep "\[$__ifp__->.* = " > /dev/null 2>&1; then
66 # Special case of array[ifp->member] = value
69 word=`echo $line | awk -F "if_" ' { print $2 }' | awk -F" =" '{ print $1 }'`
70 value=`echo $line | awk -F "=" '{ print $2 }' | sed -e 's/;//g'`
72 new=`echo $new | sed -e 's/&/\\\&/'`
73 old=`echo $line|sed -e 's/^[ ]*//'`
74 line=`echo $line| sed -e's/'$old'/'$new'/g'`
81 if echo $line | grep "$__ifp__->.*++\|++$__ifp__->.*" > /dev/null 2>&1
83 word=`echo $line | awk -F"if_" '{ print $2 }'|awk -F"\+" '{ print $1}'`
85 old=`echo $line|sed -e 's/^[ ]*//'`
87 new=`echo $new | sed -e 's/&/\\\&/'`
88 line=`echo $line| sed -e's/'$old'/'$new'/g'`
95 if echo $line | grep "$__ifp__->.*+= " > /dev/null 2>&1
97 word=`echo $line | awk -F"if_" '{ print $2 }'|awk '{ print $1}'`
98 value=`echo $line | awk -F"=" '{ print $2}' | sed -e 's/;//g'`
100 new=`echo $new | sed -e 's/&/\\\&/'`
101 old=`echo $line|sed -e 's/^[ ]*//'`
102 line=`echo $line| sed -e's/'$old'/'$new'/g'`
110 if echo $line | grep "$__ifp__->.*|= " > /dev/null 2>&1
112 word=`echo $line | awk -F"if_" '{ print $2 }'|awk '{ print $1}'`
113 value=`echo $line | awk -F"=" '{ print $2}' | sed -e 's/;//g'`
115 new=`echo $new | sed -e 's/&/\\\&/'`
116 #line=`echo $line|sed -e 's/&/\\&/'`
117 old=`echo $line|sed -e 's/^[ ]*//'`
118 line=`echo $line| sed -e's/'$old'/'$new'/g'`
126 if echo $line |grep "$__ifp__->.*&= " > /dev/null 2>&1
128 word=`echo $line | awk -F"if_" '{ print $2 }'|awk '{ print $1}'`
129 value=`echo $line | awk -F"=" '{ print $2}' | sed -e 's/;//g'`
130 value=`echo $value | sed -e's/~//g'`
132 new=`echo $new | sed -e 's/&/\\\&/'`
133 old=`echo $line|sed -e 's/^[ ]*//'`
134 line=`echo $line| sed -e's/'$old'/'$new'/g'`
142 if echo $line | grep "\^=" > /dev/null 2>&1
144 line=`echo $line | sed -e 's/'"$__ifp__"'->if_\(.*\) ^=\(.*\);/if_toggle\1('"$__ifp__"',\2);/g'`
151 # XXX - this needs updating
153 …if echo $line | grep "$__ifp__->\(if_capabilities\|if_flags\|if_softc\|if_capenable\|if_hwassist\|…
155 word=`echo $line |awk -F"$__ifp__->if_" '{ print $2 }' | \
156 sed -e's/[^a-zA-Z0-9_]/\@/'|awk -F"\@" '{ print $1}'`
157 old=`echo "$__ifp__->if_"${word}`
159 new=`echo $new | sed -e 's/&/\\\&/'`
160 line=`echo $line| sed -e's/'$old'/'$new'/g'`
172 if echo $line | grep "$orig" > /dev/null 2>&1
174 line=`echo $line | sed -e "s|$orig|$new|"`
182 replace_str "(\*$__ifp__->if_input)" "if_input" || \
183 replace_str "IFQ_DRV_IS_EMPTY(&$__ifp__->if_snd)" \
185 replace_str "IFQ_DRV_PREPEND(&$__ifp__->if_snd" \
187 replace_str "IFQ_SET_READY(&$__ifp__->if_snd)" \
191 replace_str "IFQ_SET_MAXLEN(&$__ifp__->if_snd," \
193 replace_str "IFQ_DRV_DEQUEUE(&$__ifp__->if_snd, \(.*\))" \
195 replace_str "$__ifp__->if_vlantrunk != NULL" \
219 case "$line" in
220 *"${__ifp__}->"*) return 0;; # Still an ifp to convert
227 line="$line /* ${FAIL_PAT} */"
231 if [ -e $file.tmp ]
236 echo -n "Conversion for $file started, please wait: "
237 FAIL_PAT="XXX - IFAPI"
239 while read -r line
255 if [ $passes -ge $MAX_PASSES ]; then
262 case "$line" in
264 line=`echo $line | sed -e 's/struct ifnet[ \t]*\*/if_t /g'` ;;
266 line=`echo $line | sed -e 's/IF_LLADDR(/if_getlladdr(/g'` ;;
268 printf "%s\n" "$line" >> $file.tmp
271 count=`grep $FAIL_PAT $file.tmp | wc -l`
272 if [ $count -gt 0 ]
275 echo "Look for /* $FAIL_PAT */ in the converted file"