3 # This file is part of DisOrder.
4 # Copyright (C) 2010-11 Richard Kettlewell
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 # This file contains the definition of the disorder protocol, plus
22 # code to generates stubs for it in the various supported languages.
24 # At the time of writing it is a work in progress!
29 # string A (Unicode) string.
30 # string-raw A string that is not subject to de-quoting (return only)
31 # integer An integer. Decimal on the wire.
32 # time A timestamp. Decimal on the wire.
33 # boolean True or false. "yes" or "no" on the wire.
34 # list In commands: a list of strings in the command.
35 # In returns: a list of lines in the response.
36 # pair-list In returns: a list of key-value pairs in a response body.
37 # body In commands: a list of strings as a command body.
38 # In returns: a list of strings as a response body.
39 # queue In returns: a list of queue entries in a response body.
40 # queue-one In returns: a queue entry in the response.
41 # literal Constant string sent in sequence
44 # Variables and utilities -----------------------------------------------------
52 # Mapping of return type sequences to eclient callbacks
53 our @eclient_return = (
54 ["no_response" => []],
55 ["string_response" => ["string"]],
56 ["string_response" => ["string-raw"]],
57 ["integer_response" => ["integer"]],
58 ["integer_response" => ["boolean"]],
59 ["time_response" => ["time"]],
60 ["pair_integer_response" => ["integer", "integer"]],
61 ["queue_response" => ["queue"]],
62 ["playing_response" => ["queue-one"]],
63 ["list_response" => ["body"]],
66 # eclient_response_matces(RETURNS, VARIANT)
68 # Return true if VARIANT matches RETURNS
69 sub eclient_response_matches
{
72 my $types = $variant->[1];
73 if(scalar @
$returns != scalar @
$types) { return 0; }
74 for my $n (0 .. $#$returns) {
75 my $return = $returns->[$n];
76 my $type = $return->[0];
77 if($type ne $types->[$n]) { return 0; }
82 # find_eclient_type(RETURNS)
84 # Find the result type for an eclient call
85 sub find_eclient_response
{
87 if(!defined $returns) {
90 for my $variant (@eclient_return) {
91 if(eclient_response_matches
($returns, $variant)) {
100 # Write array ref LINES to file PATH.
108 or die "$0: $path: $!\n";
111 # Command classes -------------------------------------------------------------
113 # c_in_decl([TYPE, NAME])
115 # Return the C declaration for an input parameter of type TYPE with
120 my $type = $arg->[0];
121 my $name = $arg->[1];
122 if($type eq 'string') {
123 return "const char *$name";
124 } elsif($type eq 'integer') {
126 } elsif($type eq 'time') {
127 return "time_t $name";
128 } elsif($type eq 'list' or $type eq 'body') {
129 return ("char **$name",
131 } elsif($type eq 'literal') {
134 die "$0: c_in_decl: unknown type '$type'\n";
138 # c_out_decl([TYPE, NAME])
140 # Return the C declaration for an output (reference) parameter of type
141 # TYPE with name NAME.
145 return () unless defined $arg;
146 my $type = $arg->[0];
147 my $name = $arg->[1];
148 if($type eq 'string' or $type eq 'string-raw') {
149 return ("char **${name}p");
150 } elsif($type eq 'integer') {
151 return ("long *${name}p");
152 } elsif($type eq 'time') {
153 return ("time_t *${name}p");
154 } elsif($type eq 'boolean') {
155 return ("int *${name}p");
156 } elsif($type eq 'list' or $type eq 'body') {
157 return ("char ***${name}p",
159 } elsif($type eq 'pair-list') {
160 return ("struct kvp **${name}p");
161 } elsif($type eq 'queue' or $type eq 'queue-one') {
162 return ("struct queue_entry **${name}p");
163 } elsif($type eq 'user') {
166 die "$0: c_out_decl: unknown type '$type'\n";
170 # c_param_docs([TYPE, NAME})
172 # Return the doc string for a C input parameter.
176 for my $arg (@
$args) {
177 my $type = $arg->[0];
178 my $name = $arg->[1];
179 my $description = $arg->[2];
180 if($type eq 'body' or $type eq 'list') {
182 " * \@param $name $description\n",
183 " * \@param n$name Length of $name\n");
184 } elsif($type ne 'literal') {
185 push(@d, " * \@param $name $description\n");
191 # c_param_docs([TYPE, NAME})
193 # Return the doc string for a C output parameter.
196 return () unless defined $returns;
198 for my $return (@
$returns) {
199 my $type = $return->[0];
200 my $name = $return->[1];
201 my $descr = $return->[2];
203 or $type eq 'string-raw'
204 or $type eq 'integer'
206 or $type eq 'boolean') {
208 " * \@param ${name}p $descr\n");
209 } elsif($type eq 'list' or $type eq 'body') {
211 " * \@param ${name}p $descr\n",
212 " * \@param n${name}p Number of elements in ${name}p\n");
213 } elsif($type eq 'pair-list') {
215 " * \@param ${name}p $descr\n");
216 } elsif($type eq 'queue' or $type eq 'queue-one') {
218 " * \@param ${name}p $descr\n");
219 } elsif($type eq 'user') {
222 die "$0: c_return_docs: unknown type '$type'\n";
228 # simple(CMD, SUMMARY, DETAIL,
229 # [[TYPE,NAME,DESCR], [TYPE,NAME,DESCR], ...],
230 # [[RETURN-TYPE, RETURN-NAME, RETURN_DESCR]])
232 # CMD is normally just the name of the command, but can
233 # be [COMMAND,FUNCTION] if the function name should differ
234 # from the protocol command.
243 if(ref $cmd eq 'ARRAY') {
250 print STDERR
"Processing $cmd... ";
253 for my $arg (@
$args) {
254 if($arg->[0] eq 'body' or $arg->[0] eq 'list') {
255 push(@cargs, "disorder__$arg->[0]", $arg->[1], "n$arg->[1]");
256 } elsif($arg->[0] eq 'string') {
257 push(@cargs, $arg->[1]);
258 } elsif($arg->[0] eq 'integer'
259 or $arg->[0] eq 'time') {
260 push(@cargs, "disorder__$arg->[0]", "$arg->[1]");
261 } elsif($arg->[0] eq 'literal') {
262 push(@cargs, "\"$arg->[1]\"");
264 die "$0: unsupported arg type '$arg->[0]' for '$cmd'\n";
269 push(@h, "/** \@brief $summary\n",
273 " * \@param c Client\n",
275 c_return_docs
($returns),
276 " * \@return 0 on success, non-0 on error\n",
278 "int disorder_$cmdc(",
279 join(", ", "disorder_client *c",
280 map(c_in_decl
($_), @
$args),
281 map(c_out_decl
($_), @
$returns)),
284 push(@c, "int disorder_$cmdc(",
285 join(", ", "disorder_client *c",
286 map(c_in_decl
($_), @
$args),
287 map(c_out_decl
($_), @
$returns)),
289 if(!defined $returns or scalar @
$returns == 0) {
291 push(@c, " return disorder_simple(",
292 join(", ", "c", "NULL", "\"$cmd\"", @cargs, "(char *)NULL"),
294 } elsif(scalar @
$returns == 1
295 and $returns->[0]->[0] eq 'queue-one') {
297 my $return = $$returns[0];
298 push(@c, " return onequeue(c, \"$cmd\", $return->[1]p);\n");
299 } elsif(scalar @
$returns == 1
300 and $returns->[0]->[0] eq 'string-raw') {
302 my $return = $$returns[0];
303 push(@c, " return disorder_simple(",
304 join(", ", "c", "$return->[1]p", "\"$cmd\"", @cargs, "(char *)NULL"),
306 } elsif(scalar @
$returns == 1
307 and $returns->[0]->[0] eq 'pair-list') {
309 my $return = $$returns[0];
310 push(@c, " return pairlist(",
311 join(", ", "c", "$return->[1]p", "\"$cmd\"",
317 for(my $n = 0; $n < scalar @
$returns; ++$n) {
318 my $return = $returns->[$n];
319 my $type = $return->[0];
320 my $name = $return->[1];
322 or $type eq 'boolean'
323 or $type eq 'integer'
325 or $type eq 'user') {
330 push(@c, " char **v;\n",
331 " int nv, rc = disorder_simple_split(",
345 " int rc = disorder_simple(",
356 for(my $n = 0; $n < scalar @
$returns; ++$n) {
357 my $return = $returns->[$n];
358 my $type = $return->[0];
359 my $name = $return->[1];
360 if($type eq 'string') {
362 " *${name}p = v[$n];\n",
364 } elsif($type eq 'boolean') {
366 " if(boolean(\"$cmd\", v[$n], ${name}p))\n",
368 } elsif($type eq 'integer') {
370 " *${name}p = atol(v[$n]);\n");
371 } elsif($type eq 'time') {
373 " *${name}p = atoll(v[$n]);\n");
374 } elsif($type eq 'user') {
376 " c->user = v[$n];\n",
378 } elsif($type eq 'body') {
380 " if(readlist(c, ${name}p, n${name}p))\n",
382 } elsif($type eq 'queue') {
384 " if(readqueue(c, ${name}p))\n",
387 die "$0: C API: unknown return type '$type' for '$name'\n";
392 " free_strings(nv, v);\n");
394 push(@c, " return 0;\n");
399 my $variant = find_eclient_response
($returns);
400 if(defined $variant) {
403 "/** \@brief $summary\n",
407 " * \@param c Client\n",
408 " * \@param completed Called upon completion\n",
410 " * \@param v Passed to \@p completed\n",
411 " * \@return 0 if the command was queued successfuly, non-0 on error\n",
413 "int disorder_eclient_$cmdc(",
414 join(", ", "disorder_eclient *c",
415 "disorder_eclient_$variant *completed",
416 map(c_in_decl
($_), @
$args),
422 "int disorder_eclient_$cmdc(",
423 join(", ", "disorder_eclient *c",
424 "disorder_eclient_$variant *completed",
425 map(c_in_decl
($_), @
$args),
428 push(@ac, " return simple(",
431 "${variant}_opcallback",
432 "(void (*)())completed",
440 push(@missing, "disorder_eclient_$cmdc");
451 # TODO other command classes
453 # Front matter ----------------------------------------------------------------
455 our @generated = ("/*\n",
456 " * Automatically generated file, see scripts/protocol\n",
462 " * This file is part of DisOrder.\n",
463 " * Copyright (C) 2010-11 Richard Kettlewell\n",
465 " * This program is free software: you can redistribute it and/or modify\n",
466 " * it under the terms of the GNU General Public License as published by\n",
467 " * the Free Software Foundation, either version 3 of the License, or\n",
468 " * (at your option) any later version.\n",
470 " * This program is distributed in the hope that it will be useful,\n",
471 " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
472 " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n",
473 " * GNU General Public License for more details.\n",
475 " * You should have received a copy of the GNU General Public License\n",
476 " * along with this program. If not, see <http://www.gnu.org/licenses/>.\n",
480 push(@h, @generated, @gpl,
481 "#ifndef CLIENT_STUBS_H\n",
482 "#define CLIENT_STUBS_H\n",
483 "/** \@file lib/client-stubs.h\n",
484 " * \@brief Generated client API\n",
486 " * Don't include this file directly - use \@ref lib/client.h instead.\n",
490 push(@c, @generated, @gpl,
491 "/** \@file lib/client-stubs.c\n",
492 " * \@brief Generated client API implementation\n",
496 push(@ah, @generated, @gpl,
497 "#ifndef ECLIENT_STUBS_H\n",
498 "#define ECLIENT_STUBS_H\n",
499 "/** \@file lib/client-stubs.h\n",
500 " * \@brief Generated asynchronous client API\n",
502 " * Don't include this file directly - use \@ref lib/eclient.h instead.\n",
506 push(@ac, @generated, @gpl,
507 "/** \@file lib/client-stubs.c\n",
508 " * \@brief Generated asynchronous client API implementation\n",
512 # The protocol ----------------------------------------------------------------
516 "Makes the calling user owner of a randomly picked track.",
517 [["string", "id", "Track ID"]]);
521 "Create a new user. Requires the 'admin' right. Email addresses etc must be filled in in separate commands.",
522 [["string", "user", "New username"],
523 ["string", "password", "Initial password"],
524 ["string", "rights", "Initial rights (optional)"]]);
527 "List files and directories in a directory",
528 "See 'files' and 'dirs' for more specific lists.",
529 [["string", "dir", "Directory to list (optional)"],
530 ["string", "re", "Regexp that results must match (optional)"]],
531 [["body", "files", "List of matching files and directories"]]);
534 "Confirm registration",
535 "The confirmation string must have been created with 'register'. The username is returned so the caller knows who they are.",
536 [["string", "confirmation", "Confirmation string"]],
540 "Log in with a cookie",
541 "The cookie must have been created with 'make-cookie'. The username is returned so the caller knows who they are.",
542 [["string", "cookie", "Cookie string"]],
547 "Requires the 'admin' right.",
548 [["string", "user", "User to delete"]]);
551 "List directories in a directory",
553 [["string", "dir", "Directory to list (optional)"],
554 ["string", "re", "Regexp that results must match (optional)"]],
555 [["body", "files", "List of matching directories"]]);
559 "Play will stop at the end of the current track, if one is playing. Requires the 'global prefs' right.",
563 "Set a user property",
564 "With the 'admin' right you can do anything. Otherwise you need the 'userinfo' right and can only set 'email' and 'password'.",
565 [["string", "username", "User to modify"],
566 ["string", "property", "Property name"],
567 ["string", "value", "New property value"]]);
571 "Requires the 'global prefs' right.",
575 "Detect whether play is enabled",
578 [["boolean", "enabled", "1 if play is enabled and 0 otherwise"]]);
581 "Test whether a track exists",
583 [["string", "track", "Track name"]],
584 [["boolean", "exists", "1 if the track exists and 0 otherwise"]]);
587 "List files in a directory",
589 [["string", "dir", "Directory to list (optional)"],
590 ["string", "re", "Regexp that results must match (optional)"]],
591 [["body", "files", "List of matching files"]]);
594 "Get a track preference",
595 "If the track does not exist that is an error. If the track exists but the preference does not then a null value is returned.",
596 [["string", "track", "Track name"],
597 ["string", "pref", "Preference name"]],
598 [["string", "value", "Preference value"]]);
601 "Get a global preference",
602 "If the preference does exist not then a null value is returned.",
603 [["string", "pref", "Global preference name"]],
604 [["string", "value", "Preference value"]]);
607 "Get a track's length",
608 "If the track does not exist an error is returned.",
609 [["string", "track", "Track name"]],
610 [["integer", "length", "Track length in seconds"]]);
614 simple
("make-cookie",
615 "Create a login cookie for this user",
616 "The cookie may be redeemed via the 'cookie' command",
618 [["string", "cookie", "Newly created cookie"]]);
622 "Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.",
623 [["string", "track", "Track ID or name"],
624 ["integer", "delta", "How far to move the track towards the head of the queue"]]);
627 "Move multiple tracks",
628 "Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.",
629 [["string", "target", "Move after this track, or to head if \"\""],
630 ["list", "ids", "List of tracks to move by ID"]]);
632 simple
(["new", "new_tracks"],
633 "List recently added tracks",
635 [["integer", "max", "Maximum tracks to fetch, or 0 for all available"]],
636 [["body", "tracks", "Recently added tracks"]]);
640 "Used as a keepalive. No authentication required.",
644 "Get a track name part",
645 "If the name part cannot be constructed an empty string is returned.",
646 [["string", "track", "Track name"],
647 ["string", "context", "Context (\"sort\" or \"display\")"],
648 ["string", "part", "Name part (\"artist\", \"album\" or \"title\")"]],
649 [["string", "part", "Value of name part"]]);
652 "Pause the currently playing track",
653 "Requires the 'pause' right.",
658 "Requires the 'play' right.",
659 [["string", "track", "Track to play"]],
660 [["string-raw", "id", "Queue ID of new track"]]);
663 "Play multiple tracks",
664 "Requires the 'play' right.",
665 [["string", "target", "Insert into queue after this track, or at head if \"\""],
666 ["list", "tracks", "List of track names to play"]]);
669 "Retrieve the playing track",
672 [["queue-one", "playing", "Details of the playing track"]]);
674 simple
("playlist-delete",
676 "Requires the 'play' right and permission to modify the playlist.",
677 [["string", "playlist", "Playlist to delete"]]);
679 simple
("playlist-get",
680 "List the contents of a playlist",
681 "Requires the 'read' right and oermission to read the playlist.",
682 [["string", "playlist", "Playlist name"]],
683 [["body", "tracks", "List of tracks in playlist"]]);
685 simple
("playlist-get-share",
686 "Get a playlist's sharing status",
687 "Requires the 'read' right and permission to read the playlist.",
688 [["string", "playlist", "Playlist to read"]],
689 [["string-raw", "share", "Sharing status (\"public\", \"private\" or \"shared\")"]]);
691 simple
("playlist-lock",
693 "Requires the 'play' right and permission to modify the playlist. A given connection may lock at most one playlist.",
694 [["string", "playlist", "Playlist to delete"]]);
696 simple
("playlist-set",
697 "Set the contents of a playlist",
698 "Requires the 'play' right and permission to modify the playlist, which must be locked.",
699 [["string", "playlist", "Playlist to modify"],
700 ["body", "tracks", "New list of tracks for playlist"]]);
702 simple
("playlist-set-share",
703 "Set a playlist's sharing status",
704 "Requires the 'play' right and permission to modify the playlist.",
705 [["string", "playlist", "Playlist to modify"],
706 ["string", "share", "New sharing status (\"public\", \"private\" or \"shared\")"]]);
708 simple
("playlist-unlock",
709 "Unlock the locked playlist playlist",
710 "The playlist to unlock is implicit in the connection.",
715 "Requires the 'read' right. Only playlists that you have permission to read are returned.",
717 [["body", "playlists", "Playlist names"]]);
720 "Get all the preferences for a track",
722 [["string", "track", "Track name"]],
723 [["pair-list", "prefs", "Track preferences"]]);
729 [["queue", "queue", "Current queue contents"]]);
731 simple
("random-disable",
732 "Disable random play",
733 "Requires the 'global prefs' right.",
736 simple
("random-enable",
737 "Enable random play",
738 "Requires the 'global prefs' right.",
741 simple
("random-enabled",
742 "Detect whether random play is enabled",
743 "Random play counts as enabled even if play is disabled.",
745 [["boolean", "enabled", "1 if random play is enabled and 0 otherwise"]]);
748 "List recently played tracks",
751 [["queue", "recent", "Recently played tracks"]]);
753 simple
("reconfigure",
754 "Re-read configuraiton file.",
755 "Requires the 'admin' right.",
759 "Register a new user",
760 "Requires the 'register' right which is usually only available to the 'guest' user. Redeem the confirmation string via 'confirm' to complete registration.",
761 [["string", "username", "Requested new username"],
762 ["string", "password", "Requested initial password"],
763 ["string", "email", "New user's email address"]],
764 [["string", "confirmation", "Confirmation string"]]);
767 "Send a password reminder.",
768 "If the user has no valid email address, or no password, or a reminder has been sent too recently, then no reminder will be sent.",
769 [["string", "username", "User to remind"]]);
772 "Remove a track form the queue.",
773 "Requires one of the 'remove mine', 'remove random' or 'remove any' rights depending on how the track came to be added to the queue.",
774 [["string", "id", "Track ID"]]);
777 "Rescan all collections for new or obsolete tracks.",
778 "Requires the 'rescan' right.",
779 []); # TODO wait/fresh flags
782 "Resolve a track name",
783 "Converts aliases to non-alias track names",
784 [["string", "track", "Track name (might be an alias)"]],
785 [["string", "resolved", "Resolve track name (definitely not an alias)"]]);
788 "Resume the currently playing track",
789 "Requires the 'pause' right.",
794 "It will not subsequently be possible to log in with the cookie.",
797 simple
("rtp-address",
798 "Get the server's RTP address information",
801 [["string", "address", "Where to store hostname or address"],
802 ["string", "port", "Where to store service name or port number"]]);
805 "Terminate the playing track.",
806 "Requires one of the 'scratch mine', 'scratch random' or 'scratch any' rights depending on how the track came to be added to the queue.",
807 [["string", "id", "Track ID (optional)"]]);
809 simple
(["schedule-add", "schedule_add_play"],
810 "Schedule a track to play in the future",
812 [["time", "when", "When to play the track"],
813 ["string", "priority", "Event priority (\"normal\" or \"junk\")"],
814 ["literal", "play", ""],
815 ["string", "track", "Track to play"]]);
817 simple
(["schedule-add", "schedule_add_set_global"],
818 "Schedule a global setting to be changed in the future",
820 [["time", "when", "When to change the setting"],
821 ["string", "priority", "Event priority (\"normal\" or \"junk\")"],
822 ["literal", "set-global", ""],
823 ["string", "pref", "Global preference to set"],
824 ["string", "value", "New value of global preference"]]);
826 simple
(["schedule-add", "schedule_add_unset_global"],
827 "Schedule a global setting to be unset in the future",
829 [["time", "when", "When to change the setting"],
830 ["string", "priority", "Event priority (\"normal\" or \"junk\")"],
831 ["literal", "set-global", ""],
832 ["string", "pref", "Global preference to set"]]);
834 simple
("schedule-del",
835 "Delete a scheduled event.",
836 "Users can always delete their own scheduled events; with the admin right you can delete any event.",
837 [["string", "event", "ID of event to delete"]]);
839 simple
("schedule-get",
840 "Get the details of scheduled event",
842 [["string", "id", "Event ID"]],
843 [["pair-list", "actiondata", "Details of event"]]);
845 simple
("schedule-list",
846 "List scheduled events",
847 "This just lists IDs. Use 'schedule-get' to retrieve more detail",
849 [["body", "ids", "List of event IDs"]]);
853 "Terms are either keywords or tags formatted as 'tag:TAG-NAME'.",
854 [["string", "terms", "List of search terms"]],
855 [["body", "tracks", "List of matching tracks"]]);
858 "Set a track preference",
859 "Requires the 'prefs' right.",
860 [["string", "track", "Track name"],
861 ["string", "pref", "Preference name"],
862 ["string", "value", "New value"]]);
865 "Set a global preference",
866 "Requires the 'global prefs' right.",
867 [["string", "pref", "Preference name"],
868 ["string", "value", "New value"]]);
871 "Request server shutdown",
872 "Requires the 'admin' right.",
876 "Get server statistics",
877 "The details of what the server reports are not really defined. The returned strings are intended to be printed out one to a line.",
879 [["body", "stats", "List of server information strings."]]);
882 "Get a list of known tags",
883 "Only tags which apply to at least one track are returned.",
885 [["body", "tags", "List of tags"]]);
888 "Unset a track preference",
889 "Requires the 'prefs' right.",
890 [["string", "track", "Track name"],
891 ["string", "pref", "Preference name"]]);
893 simple
("unset-global",
894 "Set a global preference",
895 "Requires the 'global prefs' right.",
896 [["string", "pref", "Preference name"]]);
898 # 'user' only used for authentication
901 "Get a user property.",
902 "If the user does not exist an error is returned, if the user exists but the property does not then a null value is returned.",
903 [["string", "username", "User to read"],
904 ["string", "property", "Property to read"]],
905 [["string", "value", "Value of property"]]);
908 "Get a list of users",
911 [["body", "users", "List of users"]]);
914 "Get the server version",
917 [["string", "version", "Server version string"]]);
919 simple
(["volume", "set_volume"],
922 [["integer", "left", "Left channel volume"],
923 ["integer", "right", "Right channel volume"]]);
925 simple
(["volume", "get_volume"],
929 [["integer", "left", "Left channel volume"],
930 ["integer", "right", "Right channel volume"]]);
932 # End matter ------------------------------------------------------------------
934 push(@h, "#endif\n");
936 push(@ah, "#endif\n");
938 # Write it all out ------------------------------------------------------------
940 Write
("lib/client-stubs.h", \
@h);
941 Write
("lib/client-stubs.c", \
@c);
943 Write
("lib/eclient-stubs.h", \
@ah);
944 Write
("lib/eclient-stubs.c", \
@ac);
946 if(scalar @missing) {
948 print map(" $_\n", @missing);