#!/bin/rc
panels=`{grep '^Pops [a-z]+ops =' *.c |
sed 's/^.*:Pops ([a-z]+ops) =.*/\1/' |
grep -v 'rowops|colops|nilops'}
panels=(nilops rowops colops $panels)
cat <<!
/* Automatically generated. Do not edit.
*/
#include <u.h>
#include <libc.h>
#include <thread.h>
#include <fcall.h>
#include <draw.h>
#include <mouse.h>
#include <ctype.h>
#include <keyboard.h>
#include <frame.h>
#include <9p.h>
#include <bio.h>
#include "gui.h"
#include "cook.h"
!
for (p in $panels){
echo 'extern Pops '^$p^';'
}
echo 'Pops* panels[] = {'
for (p in $panels){
echo ' &'^$p^','
}
echo ' nil,'
cat <<!
};
void
panelok(Panel* p)
{
assert(p && p != (Panel*)0xfefefefe);
assert(p->type >= 0 && p->type < nelem(panels));
}
!
|