+static HashTable psi_cpp_defaults;
+static HashTable psi_cpp_pragmas;
+
+typedef bool (*psi_cpp_pragma_func)(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl);
+
+static bool psi_cpp_pragma_once(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl)
+{
+ return NULL != zend_hash_add_empty_element(&cpp->once, decl->token->file);
+}
+
+static bool psi_cpp_pragma_lib(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl)
+{
+ struct psi_token *lib = NULL;
+ zend_string *libname;
+
+ if (!psi_plist_get(decl->tokens, 0, &lib)
+ || !lib || lib->type != PSI_T_QUOTED_STRING) {
+ return false;
+ }
+
+ libname = zend_string_copy(lib->text);
+ cpp->parser->file.libnames = psi_plist_add(cpp->parser->file.libnames,
+ &libname);
+ return true;
+}
+
+static bool psi_cpp_pragma_blacklist_decl(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl)
+{
+ struct psi_token *name;
+
+ if (!psi_plist_get(decl->tokens, 0, &name)
+ || !name || name->type != PSI_T_QUOTED_STRING) {
+ return false;
+ }
+
+ psi_blacklist_add_decl(name->text->val, name->text->len);
+ return true;
+}
+
+static bool psi_cpp_pragma_blacklist_var(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl)
+{
+ struct psi_token *name;
+
+ if (!psi_plist_get(decl->tokens, 0, &name)
+ || !name || name->type != PSI_T_QUOTED_STRING) {
+ return false;
+ }