+/*********************************************************************
+ *
+ * Function : map_block_keep
+ *
+ * Description : Convenience function. Removes the markers used
+ * by map-block-killer, to save a few bytes.
+ * i.e. removes "@if-<name>-start@" and "@if-<name>-end@"
+ *
+ * Parameters :
+ * 1 : exports = map to extend
+ * 2 : name = name of conditional block
+ *
+ * Returns : JB_ERR_OK on success
+ * JB_ERR_MEMORY on out-of-memory error.
+ *
+ *********************************************************************/
+jb_err map_block_keep(struct map *exports, const char *name)
+{
+ jb_err err;
+ char buf[500]; /* Will do, since the names are hardwired */
+
+ assert(exports);
+ assert(name);
+ assert(strlen(name) < 490);
+
+ snprintf(buf, 500, "if-%s-start", name);
+ err = map(exports, buf, 1, "", 1);
+
+ if (err)
+ {
+ return err;
+ }
+
+ snprintf(buf, 500, "if-%s-end", name);
+ return map(exports, buf, 1, "", 1);
+}
+
+