Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2005-11-19 23:53:04 UTC
Modified files:
Tag: u2_10_12_branch
ircd/convert-conf.c ChangeLog
Log message:
Fix buglet in Feature section and print original input F: lines.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.40 ircu2.10/ChangeLog:1.710.2.41
--- ircu2.10/ChangeLog:1.710.2.40 Fri Nov 18 17:08:20 2005
+++ ircu2.10/ChangeLog Sat Nov 19 15:52:54 2005
@@ -1,3 +1,9 @@
+2005-11-19 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/convert-conf.c (finish_features): Only emit "Features {"
+ once in the converted configuration file. Display the original
+ input line for each feature line in the output.
+
2005-11-18 Michael Poole <[EMAIL PROTECTED]>
* include/patchlevel.h (PATCHLEVEL): Update for pre05.
Index: ircu2.10/ircd/convert-conf.c
diff -u ircu2.10/ircd/convert-conf.c:1.2.2.1
ircu2.10/ircd/convert-conf.c:1.2.2.2
--- ircu2.10/ircd/convert-conf.c:1.2.2.1 Wed Nov 16 18:23:27 2005
+++ ircu2.10/ircd/convert-conf.c Sat Nov 19 15:52:54 2005
@@ -111,6 +111,14 @@
char value[1];
};
+/** Find or insert the element from \a list that contains \a value.
+ * If an element of \a list already contains \a value, return it.
+ * Otherwise, append a new element to \a list containing \a value and
+ * return it.
+ * @param[in,out] list A list of strings.
+ * @param[in] value A string to search for.
+ * @return A string list element from \a list containing \a value.
+ */
static struct string_list *string_get(struct string_list **list, const char
*value)
{
struct string_list *curr;
@@ -309,10 +317,15 @@
struct feature *feat;
size_t ii;
- fputs("Features {\n\t\"OPLEVELS\" = \"FALSE\";\n", stdout);
- fputs("Features {\n\t\"ZANNELS\" = \"FALSE\";\n", stdout);
+ fputs("Features {\n", stdout);
+ fputs("\t\"OPLEVELS\" = \"FALSE\";\n", stdout);
+ fputs("\t\"ZANNELS\" = \"FALSE\";\n", stdout);
for (feat = features; feat; feat = feat->next) {
+ /* Display the original feature line we are talking about. */
+ for (sl = feat->origins; sl; sl = sl->next)
+ fprintf(stdout, "# %s\n", sl->value);
+
/* See if the feature was remapped to an oper privilege. */
for (rmf = remapped_features; rmf->name; rmf++)
if (0 == strcmp(feat->name, rmf->name))
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches