minor recovery changes

- add the --just_exit option to make recovery exit normally without doing anything
- make it possible to build updater extensions in C++
- add the clear_display command so that the updater binary can request
  recovery switch to the NONE background UI

These are all used to support the notion of using OTA as a factory
reflash mechanism.

Change-Id: Ib00d1cbf540feff38f52a61a2cf198915b48488c
diff --git a/edify/expr.h b/edify/expr.h
index 8e1c638..0d8ed8f 100644
--- a/edify/expr.h
+++ b/edify/expr.h
@@ -21,6 +21,10 @@
 
 #include "yydefs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define MAX_STRING_LEN 1024
 
 typedef struct Expr Expr;
@@ -152,7 +156,7 @@
 
 // Use printf-style arguments to compose an error message to put into
 // *state.  Returns NULL.
-Value* ErrorAbort(State* state, char* format, ...);
+Value* ErrorAbort(State* state, const char* format, ...) __attribute__((format(printf, 2, 3)));
 
 // Wrap a string into a Value, taking ownership of the string.
 Value* StringValue(char* str);
@@ -160,4 +164,8 @@
 // Free a Value object.
 void FreeValue(Value* v);
 
+#ifdef __cplusplus
+}  // extern "C"
+#endif
+
 #endif  // _EXPRESSION_H