Writing a Feeder program

A Feeder program is a C program which Zilla executes on your local machine.  This program 'feeds' Zilla with information about what machines to run, what commands to be executed, etc.  In order to make writing a feeder program as easy as possible, a Feeder object has been provided.  The files 'Feeder.h' and 'Feeder.o', which describe the object, are located in the Zilla.app directory.

What follows is a short description of all the instance methods for the Feeder object:

-(int)numMachines
	Returns the number of machines in the curent network.

-(int)getFreeMachine
	Returns the first machine on which no process is running, or -1 if none are
	available.
	Note: This method should not be used if you have Non-NeXT computers in
	your Zilla network. 

-(int)isLaunchable:(int)which;
     Returns non-zero iff machine #which has permission, is selected (or part of a launch-all
     set), and is not currently running some Zilla process.
     The idea is to use this method in loops, and avoid launch attempts on machines that
     cannot or should not be launched.
     
-getHostname:(char *)hname for:(int)which
	Returns the name of a particular machine in hname.  which is an integer
	between 0 and numMachines.

-getUsername:(char *)uname for:(int)which
	Returns the login name assigned to the host number which.

-getCommand:(char *)cmd for:(int)which
	Returns the command assigned to the host number which.

-(int)addHost:(char *)n user:(char *)u password:(char *)p command:(char *)c
 	Adds a new host to the network.  The id number of that host is returned.
   
-changeHost:(int)which user:(char *)u password:(char *)p command:(char *)c
	Change any information for a particular host.  If any of user, password, or
	command are NULL, the old value of that field is left unchanged.

-(int)launchQueryMachine:(int)which;
     Similar to launchMachine:   mRSGd below, except that an error of zero is returned
     iff there was no problem encountered during launch.
     
-launchMachine:(int)which
	Launches whatever command is specified for machine which, on that
	machine.

-launchAll
	Launches all machines in the current network.

-killMachine:(int)which
	Stops the process running on machine which.

-killAll
	Stops all running processes in the current network.

For an example of a typical feeder, see 'ecmfeed.m' described in the Advanced Example help.

All feeder programs must have the extension '.feed'.  A typical compile should look something like:
 
 > cc -O mynewfeeder.m Feeder.o -s -o mynewfeeder.feed