Restore proplist.c, which was clobbered by mistake during a rebase.

Lessons learned: don't rebase so freely, review commits properly.
This commit is contained in:
2025-10-23 15:40:50 -04:00
parent bd61e58821
commit 4f4dcf551b
+30
View File
@@ -0,0 +1,30 @@
#include <stdarg.h>
#include "WUtil.h"
/*
* This should be written in Rust whenever va_args support improves.
*/
WMPropList *WMCreatePLArray(WMPropList * elem, ...)
{
WMPropList *plist, *nelem;
va_list ap;
plist = WMCreateEmptyPLArray();
if (!elem)
return plist;
WMAddToPLArray(plist, elem);
va_start(ap, elem);
while (1) {
nelem = va_arg(ap, WMPropList *);
if (!nelem) {
va_end(ap);
return plist;
}
WMAddToPLArray(plist, elem);
}
}