Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: gdb/observer.sh

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/observer.c ('k') | gdb/opencl-lang.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh -e 1 #!/bin/sh -e
2 2
3 # Make certain that the script is not running in an internationalized 3 # Make certain that the script is not running in an internationalized
4 # environment. 4 # environment.
5 LANG=C ; export LANG 5 LANG=C ; export LANG
6 LC_ALL=C ; export LC_ALL 6 LC_ALL=C ; export LC_ALL
7 7
8 if test $# -ne 3 8 if test $# -ne 3
9 then 9 then
10 echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2 10 echo "Usage: $0 <h|inc> <observer.texi> <observer.out>" 1>&2
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 cat<<EOF >>${otmp} 129 cat<<EOF >>${otmp}
130 struct ${event}_args { `echo "${formal}" | sed -e 's/,/;/g'`; }; 130 struct ${event}_args { `echo "${formal}" | sed -e 's/,/;/g'`; };
131 131
132 EOF 132 EOF
133 fi 133 fi
134 cat <<EOF >>${otmp} 134 cat <<EOF >>${otmp}
135 static void 135 static void
136 observer_${event}_notification_stub (const void *data, const void *args_data) 136 observer_${event}_notification_stub (const void *data, const void *args_data)
137 { 137 {
138 observer_${event}_ftype *notify = (observer_${event}_ftype *) data; 138 observer_${event}_ftype *notify = (observer_${event}_ftype *) data;
139 EOF
140
141 notify_args=`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1 /g'`
142
143 if test ! -z "${notify_args}"; then
144 cat<<EOF >>${otmp}
139 const struct ${event}_args *args = args_data; 145 const struct ${event}_args *args = args_data;
140 notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`); 146 EOF
147 » fi
148 » cat <<EOF >>${otmp}
149 notify (${notify_args});
141 } 150 }
142 151
143 struct observer * 152 struct observer *
144 observer_attach_${event} (observer_${event}_ftype *f) 153 observer_attach_${event} (observer_${event}_ftype *f)
145 { 154 {
146 return generic_observer_attach (&${event}_subject, 155 return generic_observer_attach (&${event}_subject,
147 &observer_${event}_notification_stub, 156 &observer_${event}_notification_stub,
148 (void *) f); 157 (void *) f);
149 } 158 }
150 159
(...skipping 30 matching lines...) Expand all
181 case $lang in 190 case $lang in
182 h) cat <<EOF >>${otmp} 191 h) cat <<EOF >>${otmp}
183 192
184 #endif /* OBSERVER_H */ 193 #endif /* OBSERVER_H */
185 EOF 194 EOF
186 esac 195 esac
187 196
188 197
189 echo Moving ${otmp} to ${o} 198 echo Moving ${otmp} to ${o}
190 mv ${otmp} ${o} 199 mv ${otmp} ${o}
OLDNEW
« no previous file with comments | « gdb/observer.c ('k') | gdb/opencl-lang.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698