aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker2009-06-12 14:24:39 -0500
committerDoug Zongker2009-06-12 16:05:03 -0500
commitd9c9d10d9da76f067d3955bea71f7bb39e859fa5 (patch)
tree1e49a3a616c3147f871e79b1b15e2b2a63379cc1 /edify/yydefs.h
parent8edb00c990e563e6f91b278a212f2edf877cf763 (diff)
downloadplatform-bootable-recovery-d9c9d10d9da76f067d3955bea71f7bb39e859fa5.tar.gz
platform-bootable-recovery-d9c9d10d9da76f067d3955bea71f7bb39e859fa5.tar.xz
platform-bootable-recovery-d9c9d10d9da76f067d3955bea71f7bb39e859fa5.zip
fixes to edify and updater script
A few more changes to edify: - fix write_raw_image(); my last change neglected to close the write context, so the written image was corrupt. - each expression tracks the span of the source code from which it was compiled, so that assert()'s error message can include the source of the expression that failed. - the 'cookie' argument to each Function is replaced with a State object, which contains the cookie, the source script (for use with the above spans), and the current error message (replacing the global variables that were used for this purpose). - in the recovery image, a new command "ui_print" can be sent back through the command pipe to cause text to appear on the screen. Add a new ui_print() function to print things from scripts. Rename existing "print" function to "stdout".
Diffstat (limited to 'edify/yydefs.h')
-rw-r--r--edify/yydefs.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/edify/yydefs.h b/edify/yydefs.h
new file mode 100644
index 00000000..62578625
--- /dev/null
+++ b/edify/yydefs.h
@@ -0,0 +1,36 @@
1/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _YYDEFS_H_
18#define _YYDEFS_H_
19
20#define YYLTYPE YYLTYPE
21typedef struct {
22 int start, end;
23} YYLTYPE;
24
25#define YYLLOC_DEFAULT(Current, Rhs, N) \
26 do { \
27 if (N) { \
28 (Current).start = YYRHSLOC(Rhs, 1).start; \
29 (Current).end = YYRHSLOC(Rhs, N).end; \
30 } else { \
31 (Current).start = YYRHSLOC(Rhs, 0).start; \
32 (Current).end = YYRHSLOC(Rhs, 0).end; \
33 } \
34 } while (0)
35
36#endif