davidg          Tue Feb 27 17:00:40 2001 EDT

  Modified files:              
    /php4/ext/midgard   article.c attachment.c calendar.c element.c 
                        event.c eventmember.c file.c group.c host.c 
                        image.c mail.c member.c mgd_article.h 
                        mgd_attachment.h mgd_calendar.h mgd_element.h 
                        mgd_event.h mgd_eventmember.h mgd_file.h 
                        mgd_group.h mgd_host.h mgd_image.h mgd_internal.h 
                        mgd_mail.h mgd_member.h mgd_oop.h mgd_page.h 
                        mgd_pageelement.h mgd_pagelink.h mgd_person.h 
                        mgd_preferences.h mgd_preparser.h mgd_sitegroup.h 
                        mgd_snippet.h mgd_snippetdir.h mgd_style.h 
                        mgd_topic.h midgard.c oop.c page.c pageelement.c 
                        pagelink.c parameter.c person.c preferences.c 
                        preparser.c sitegroup.c snippet.c snippetdir.c 
                        style.c topic.c 
  Log:
  First step towards automatic documentation
  
  
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.9 php4/ext/midgard/article.c:1.10
--- php4/ext/midgard/article.c:1.9      Sun Feb 25 11:31:17 2001
+++ php4/ext/midgard/article.c  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.9 2001/02/25 19:31:17 davidg Exp $
+/* $Id: article.c,v 1.10 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -22,14 +22,14 @@
 #include "mgd_oop.h"
 #include "mgd_article.h"
 
-MGD_FUNCTION(is_article_owner)
+MGD_FUNCTION(bool, is_article_owner, (int id))
 {
        IDINIT;
        CHECK_MGD;
        RETVAL_LONG(isarticleowner(id));
 }
 
-MGD_FUNCTION(is_article_in_topic_tree)
+MGD_FUNCTION(bool, is_article_in_topic_tree, (int topic_root, int id))
 {
        zval **root, **article;
 
@@ -103,7 +103,7 @@
        return sort[i].sort;
 }
 
-MGD_FUNCTION(list_topic_articles)
+MGD_FUNCTION(mixed, list_topic_articles, (int id, [string sort, [int type, [int 
+up]]]))
 {
        const char *sortv = NULL;
        int typev = 0;
@@ -177,7 +177,7 @@
                                   up_wild);
 }
 
-MGD_FUNCTION(list_reply_articles)
+MGD_FUNCTION(mixed, list_reply_articles, (int id))
 {
        IDINIT;
        CHECK_MGD;
@@ -187,7 +187,7 @@
                           "article.created DESC", id);
 }
 
-MGD_FUNCTION(list_topic_articles_all)
+MGD_FUNCTION(mixed, list_topic_articles_all, (int id, [string sort, [int type, [int 
+up]]]))
 {
        int *topics;
        const char *sortv = NULL;
@@ -268,7 +268,7 @@
        }
 }
 
-MGD_FUNCTION(list_topic_articles_all_fast)
+MGD_FUNCTION(mixed, list_topic_articles_all_fast, (int id, [string sort, [int type, 
+[int up]]]))
 {
        int *topics;
        const char *sortv = NULL;
@@ -347,7 +347,7 @@
        }
 }
 
-MGD_FUNCTION(list_topic_articles_all_of_person)
+MGD_FUNCTION(mixed, list_topic_articles_all_of_person, (int topic, int person))
 {
        int *topics;
        zval **topic, **person;
@@ -373,7 +373,7 @@
        }
 }
 
-MGD_FUNCTION(get_article)
+MGD_FUNCTION(mixed, get_article, ([int id]))
 {
        zval **id;
        CHECK_MGD;
@@ -403,7 +403,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_ARTICLE, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_article_by_name)
+MGD_FUNCTION(mixed, get_article_by_name, ([int topic, string name]))
 {
        zval **id, **name;
        CHECK_MGD;
@@ -446,7 +446,7 @@
                                (*id)->value.lval, (*name)->value.str.val);
 }
 
-MGD_FUNCTION(get_reply_by_name)
+MGD_FUNCTION(mixed, get_reply_by_name, ([int article, string name]))
 {
        zval **id, **name;
        CHECK_MGD;
@@ -478,7 +478,13 @@
                                (*id)->value.lval, (*name)->value.str.val);
 }
 
-MGD_FUNCTION(create_article)
+MGD_FUNCTION(int, create_article, (int up, int topic, string name,
+                                                                       string title, 
+string abstract,
+                                                                       string 
+content, string author,
+                                                                       string url, 
+string calstart,
+                                                                       int caldays, 
+int icon, int view,
+                                                                       int print, 
+string extra1, string extra2,
+                                                                       string extra3, 
+int type))
 {
        zval **up, **topic, **name, **title, **abstract, **content, **author;
        zval **url, **calstart, **caldays, **icon, **view, **print;
@@ -592,7 +598,7 @@
        PHP_CREATE_REPLIGARD("article", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_article_score)
+MGD_FUNCTION(bool, update_article_score, (int id, int score))
 {
        zval **id, **score, *self;
        RETVAL_FALSE;
@@ -626,7 +632,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_article_created)
+MGD_FUNCTION(bool, update_article_created, (int id, int timestamp))
 {
        zval **id, **timestamp;
        RETVAL_FALSE;
@@ -646,7 +652,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_article_replyto)
+MGD_FUNCTION(bool, update_article_replyto, (int id, int up))
 {
        zval **id, **up;
 #if HAVE_MIDGARD_SITEGROUPS
@@ -692,7 +698,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_article_type)
+MGD_FUNCTION(bool, update_article_type, (int id, int type))
 {
        zval **id, **type, *self;
        RETVAL_FALSE;
@@ -724,7 +730,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(toggle_article_lock)
+MGD_FUNCTION(bool, toggle_article_lock, (int id))
 {
        zval **id;
        RETVAL_FALSE;
@@ -743,7 +749,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(approve_article)
+MGD_FUNCTION(bool, approve_article, (int id, [bool approve=1]))
 {
        zval **id;
        zval **approve;
@@ -786,7 +792,13 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_article)
+MGD_FUNCTION(bool, update_article, (int id, int topic, string name,
+                                                                       string title, 
+string abstract,
+                                                                       string 
+content, string author,
+                                                                       string url, 
+string calstart,
+                                                                       int caldays, 
+int icon, int view,
+                                                                       int print, 
+string extra1, string extra2,
+                                                                       string extra3))
 {
        zval **id, **topic, **name, **title, **abstract, **content, **author;
        zval **url, **calstart, **caldays, **icon, **view, **print;
@@ -906,7 +918,7 @@
        PHP_UPDATE_REPLIGARD("article", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_article)
+MGD_FUNCTION(bool, delete_article, (int id))
 {
        IDINIT;
        CHECK_MGD;
@@ -927,7 +939,7 @@
        PHP_DELETE_REPLIGARD("article", id);
 }
 
-MGD_FUNCTION(copy_article)
+MGD_FUNCTION(int, copy_article, (int id, [int topic]))
 {
        zval **id, **newtopic;
        RETVAL_FALSE;
@@ -966,7 +978,7 @@
                                     newtopic ? (*newtopic)->value.lval : 0));
 }
 
-MGD_FUNCTION(delete_article_tree)
+MGD_FUNCTION(bool, delete_article_tree, (int id))
 {
        IDINIT;
        CHECK_MGD;
@@ -982,10 +994,10 @@
    RETURN_FALSE;
 }
 
-MGD_MOVE_FUNCTION(article, topic, article, topic)
-MGD_MOVE_FUNCTION(article, article, reply, up)
+MGD_MOVE_FUNCTION(article, topic, article, topic);
+MGD_MOVE_FUNCTION(article, article, reply, up);
 
-MGD_WALK_FUNCTION(article)
+MGD_WALK_FUNCTION(article);
 
 MidgardProperty MidgardArticleProperties [] = {
        { IS_LONG,              "up"            },
@@ -1018,7 +1030,7 @@
        { 0,                    NULL            }
 };
 
-MIDGARD_HANDLERS_DECL(article)
+MIDGARD_HANDLERS_DECL(article);
 static zend_function_entry MidgardArticleMethods[] = {
    PHP_FALIAS(midgardarticle,   mgd_ctor_article,        NULL)
    PHP_FALIAS(create,   mgd_create_article,        NULL)
@@ -1043,4 +1055,4 @@
    MidgardArticleProperties,
    NULL
 };
-MIDGARD_HANDLERS(MidgardArticle, article)
+MIDGARD_HANDLERS(MidgardArticle, article);
Index: php4/ext/midgard/attachment.c
diff -u php4/ext/midgard/attachment.c:1.5 php4/ext/midgard/attachment.c:1.6
--- php4/ext/midgard/attachment.c:1.5   Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/attachment.c       Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: attachment.c,v 1.5 2001/02/21 22:18:54 emile Exp $
+/* $Id: attachment.c,v 1.6 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -70,7 +70,7 @@
             (*name)->value.str.val);
 }
 
-MGD_FUNCTION(oop_attachment_create)
+MGD_FUNCTION(ret_type, oop_attachment_create, (type param))
 {
        zval *self;
        zval **zv_table, **zv_id;
@@ -192,7 +192,7 @@
        mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(oop_attachment_list)
+MGD_FUNCTION(ret_type, oop_attachment_list, (type param))
 {
        zval *self, **zv_table, **zv_id, **zv_order;
        char *order = NULL;
@@ -229,7 +229,7 @@
                           (*zv_table)->value.str.val, (*zv_id)->value.lval);
 }
 
-MGD_FUNCTION(open_attachment)
+MGD_FUNCTION(ret_type, open_attachment, (type param))
 {
        int pid;
        int ptable;
@@ -330,7 +330,7 @@
        mgd_release(res);
 }
 
-MGD_FUNCTION(get_attachment)
+MGD_FUNCTION(ret_type, get_attachment, (type param))
 {
        zval **id;
    zval *self;
@@ -359,7 +359,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_BLOBS, aid);
 }
 
-MGD_FUNCTION(serve_attachment)
+MGD_FUNCTION(ret_type, serve_attachment, (type param))
 {
        midgard_res *res;
        const char *location, *mimetype;
@@ -450,7 +450,7 @@
        RETVAL_TRUE;
 }
 
-MGD_FUNCTION(stat_attachment)
+MGD_FUNCTION(ret_type, stat_attachment, (type param))
 {
        midgard_res *res;
        const char *location;
@@ -537,7 +537,7 @@
 #endif
 }
 
-MGD_FUNCTION(delete_attachment)
+MGD_FUNCTION(ret_type, delete_attachment, (type param))
 {
        int pid;
        int ptable;
@@ -610,7 +610,7 @@
        mgd_release(res);
 }
 
-MGD_FUNCTION(update_attachment)
+MGD_FUNCTION(ret_type, update_attachment, (type param))
 {
        zval **id, **name, **title, **mimetype, **score, **author, *self;
        int ptable, pid;
Index: php4/ext/midgard/calendar.c
diff -u php4/ext/midgard/calendar.c:1.5 php4/ext/midgard/calendar.c:1.6
--- php4/ext/midgard/calendar.c:1.5     Sat Feb 24 05:39:30 2001
+++ php4/ext/midgard/calendar.c Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: calendar.c,v 1.5 2001/02/24 13:39:30 davidg Exp $
+/* $Id: calendar.c,v 1.6 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -23,7 +23,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_topic_calendar_all)
+MGD_FUNCTION(ret_type, list_topic_calendar_all, (type param))
 {
     int *topics;
     int typev = 0, startv = 0, stopv = 0;
@@ -117,7 +117,7 @@
        }
 }
 
-MGD_FUNCTION(list_topic_calendar_all_fast)
+MGD_FUNCTION(ret_type, list_topic_calendar_all_fast, (type param))
 {
     int *topics;
     int typev = 0, startv = 0, stopv = 0;
Index: php4/ext/midgard/element.c
diff -u php4/ext/midgard/element.c:1.4 php4/ext/midgard/element.c:1.5
--- php4/ext/midgard/element.c:1.4      Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/element.c  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: element.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: element.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -22,7 +22,7 @@
 #include "mgd_access.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_elements)
+MGD_FUNCTION(ret_type, list_elements, (type param))
 {
        IDINIT;
        CHECK_MGD;
@@ -30,7 +30,7 @@
                           "id,name", "element", "style=$d", "name", id);
 }
 
-MGD_FUNCTION(get_element)
+MGD_FUNCTION(ret_type, get_element, (type param))
 {
        zval **id;
        zval **style, **name;
@@ -68,13 +68,13 @@
        }
 }
 
-MGD_FUNCTION(get_element_by_name)
+MGD_FUNCTION(ret_type, get_element_by_name, (type param))
 {
        /* EEH: just an alias for get_element */
        php_if_mgd_get_element(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 }
 
-MGD_FUNCTION(create_element)
+MGD_FUNCTION(ret_type, create_element, (type param))
 {
        zval **style, **name, **value, *self;
 
@@ -129,7 +129,7 @@
        PHP_CREATE_REPLIGARD("element", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_element)
+MGD_FUNCTION(ret_type, update_element, (type param))
 {
        zval **id, **name, **value, *self;
 
@@ -163,7 +163,7 @@
        PHP_UPDATE_REPLIGARD("element", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_element)
+MGD_FUNCTION(ret_type, delete_element, (type param))
 {
        IDINIT;
        CHECK_MGD;
@@ -177,7 +177,7 @@
        PHP_DELETE_REPLIGARD("element", id);
 }
 
-MGD_FUNCTION(copy_element)
+MGD_FUNCTION(ret_type, copy_element, (type param))
 {
        zval **id, **newstyle;
        RETVAL_FALSE;
Index: php4/ext/midgard/event.c
diff -u php4/ext/midgard/event.c:1.7 php4/ext/midgard/event.c:1.8
--- php4/ext/midgard/event.c:1.7        Sat Feb 24 05:39:30 2001
+++ php4/ext/midgard/event.c    Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: event.c,v 1.7 2001/02/24 13:39:30 davidg Exp $
+/* $Id: event.c,v 1.8 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -23,14 +23,14 @@
 
 /* begin calendar functions */
 
-MGD_FUNCTION(is_event_owner)
+MGD_FUNCTION(ret_type, is_event_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
     RETVAL_LONG(iseventowner(id));
 }
 
-MGD_FUNCTION(create_event)
+MGD_FUNCTION(ret_type, create_event, (type param))
 {
        zval **up, **start, **end, **title, **description;
        zval **type, **extra, **owner, **busy, *self;
@@ -113,7 +113,7 @@
        PHP_CREATE_REPLIGARD("event", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_event)
+MGD_FUNCTION(ret_type, update_event, (type param))
 {
        zval **id, **start, **end, **title, **description;
        zval **type, **extra, **owner, **busy, *self;
@@ -189,7 +189,7 @@
        PHP_UPDATE_REPLIGARD("event", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_event)
+MGD_FUNCTION(ret_type, delete_event, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -207,7 +207,7 @@
     PHP_DELETE_REPLIGARD("event", id);
 }
 
-MGD_FUNCTION(delete_event_tree)
+MGD_FUNCTION(ret_type, delete_event_tree, (type param))
 {
     IDINIT;
     CHECK_MGD;
@@ -216,7 +216,7 @@
     RETURN_FALSE;
 }
 
-MGD_FUNCTION(get_event)
+MGD_FUNCTION(ret_type, get_event, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -260,7 +260,7 @@
     return sort[i].sort;
 }
 
-MGD_FUNCTION(list_events)
+MGD_FUNCTION(ret_type, list_events, (type param))
 {
     const char *sortv;
     int typev;
@@ -310,7 +310,7 @@
                                       sortv, typev, (*id)->value.lval);
 }
 
-MGD_FUNCTION(list_events_between)
+MGD_FUNCTION(ret_type, list_events_between, (type param))
 {
     const char *sortv;
     int typev;
@@ -379,7 +379,7 @@
                                                   
(*start)->value.lval,(*end)->value.lval);
 }
 
-MGD_FUNCTION(list_events_all)
+MGD_FUNCTION(ret_type, list_events_all, (type param))
 {
     int *events;
     const char *sortv;
@@ -448,7 +448,7 @@
        }
 }
 
-MGD_FUNCTION(list_events_all_between)
+MGD_FUNCTION(ret_type, list_events_all_between, (type param))
 {
     int *events;
     const char *sortv;
@@ -657,7 +657,7 @@
        }
 }
 
-MGD_FUNCTION(count_events_in_period)
+MGD_FUNCTION(ret_type, count_events_in_period, (type param))
 {
     midgard_res *res;
     zval **startn, **endn, **uidn, **typen;
@@ -757,7 +757,7 @@
                mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(count_events_in_month)
+MGD_FUNCTION(ret_type, count_events_in_month, (type param))
 {
     zval **monthn, **yearn, **typen;
     char *where;
@@ -820,7 +820,7 @@
                mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(copy_event)
+MGD_FUNCTION(ret_type, copy_event, (type param))
 {
     zval **id, **root; int id_r;
 
Index: php4/ext/midgard/eventmember.c
diff -u php4/ext/midgard/eventmember.c:1.4 php4/ext/midgard/eventmember.c:1.5
--- php4/ext/midgard/eventmember.c:1.4  Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/eventmember.c      Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: eventmember.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: eventmember.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -51,7 +51,7 @@
                return 1;
 }
 
-MGD_FUNCTION(create_event_member)
+MGD_FUNCTION(ret_type, create_event_member, (type param))
 {
        midgard_res *res;
        const char query[] = "SELECT eid FROM eventmember WHERE uid=$d";
@@ -116,7 +116,7 @@
        PHP_CREATE_REPLIGARD("eventmember", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_event_member)
+MGD_FUNCTION(ret_type, update_event_member, (type param))
 {
        zval **id, **extra, *self;
 
@@ -157,7 +157,7 @@
        PHP_UPDATE_REPLIGARD("eventmember", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_event_member)
+MGD_FUNCTION(ret_type, delete_event_member, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -169,7 +169,7 @@
     PHP_DELETE_REPLIGARD("eventmember", id);
 }
 
-MGD_FUNCTION(get_event_member)
+MGD_FUNCTION(ret_type, get_event_member, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -211,7 +211,7 @@
 }
 
 
-MGD_FUNCTION(list_event_members)
+MGD_FUNCTION(ret_type, list_event_members, (type param))
 {
     const char *sortv;
     zval **id, **sortn;
@@ -260,7 +260,7 @@
        }
 }
 
-MGD_FUNCTION(count_event_members)
+MGD_FUNCTION(ret_type, count_event_members, (type param))
 {
     midgard_res *res;
 
Index: php4/ext/midgard/file.c
diff -u php4/ext/midgard/file.c:1.4 php4/ext/midgard/file.c:1.5
--- php4/ext/midgard/file.c:1.4 Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/file.c     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: file.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_files)
+MGD_FUNCTION(ret_type, list_files, (type param))
 {
        IDINIT;
        CHECK_MGD;
        php_midgard_select(&MidgardFile, return_value, 
"id,article,type,name,content,size,md5", "file", "article=$d", "name", id);
 }
 
-MGD_FUNCTION(get_file)
+MGD_FUNCTION(ret_type, get_file, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -50,7 +50,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_FILE, (*id)->value.lval);
 }
 
-MGD_FUNCTION(create_file)
+MGD_FUNCTION(ret_type, create_file, (type param))
 {
        zval **article, **type, **name, **content, **size, **md5, *self;
        
@@ -101,7 +101,7 @@
        PHP_CREATE_REPLIGARD("file", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_file)
+MGD_FUNCTION(ret_type, update_file, (type param))
 {
        zval **id, **type, **name, **content, *self;
        
@@ -140,7 +140,7 @@
        PHP_UPDATE_REPLIGARD("file",(*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_file)
+MGD_FUNCTION(ret_type, delete_file, (type param))
 {
        IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/group.c
diff -u php4/ext/midgard/group.c:1.5 php4/ext/midgard/group.c:1.6
--- php4/ext/midgard/group.c:1.5        Thu Feb 22 09:39:37 2001
+++ php4/ext/midgard/group.c    Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.5 2001/02/22 17:39:37 davidg Exp $
+/* $Id: group.c,v 1.6 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_group_owner)
+MGD_FUNCTION(ret_type, is_group_owner, (type param))
 {
     IDINIT;
        CHECK_MGD;
     RETVAL_LONG(isgroupowner(id));
 }
 
-MGD_FUNCTION(list_groups)
+MGD_FUNCTION(ret_type, list_groups, (type param))
 {
        zval **id;
 
@@ -52,7 +52,7 @@
        php_midgard_select(&MidgardGroup, return_value, "id,name,official", "grp", 
"owner=$d", "name",(*id)->value.lval); 
 }
 
-MGD_FUNCTION(get_group)
+MGD_FUNCTION(ret_type, get_group, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -75,7 +75,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_GRP, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_group_by_name)
+MGD_FUNCTION(ret_type, get_group_by_name, (type param))
 {
        zval **id, **name;
        int gid=0;
@@ -115,7 +115,7 @@
        }
 }
 
-MGD_FUNCTION(create_group)
+MGD_FUNCTION(ret_type, create_group, (type param))
 {
        zval **name, **official, **street, **postcode, **city;
        zval **homepage, **email, **extra, **owner;
@@ -184,7 +184,7 @@
        PHP_CREATE_REPLIGARD("grp", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_group)
+MGD_FUNCTION(ret_type, update_group, (type param))
 {
        zval **gid, **name, **official, **street, **postcode, **city;
        zval **homepage, **email, **extra, **owner;
@@ -246,7 +246,7 @@
        PHP_UPDATE_REPLIGARD("grp", (*gid)->value.lval);
 }
 
-MGD_FUNCTION(delete_group)
+MGD_FUNCTION(ret_type, delete_group, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/host.c
diff -u php4/ext/midgard/host.c:1.4 php4/ext/midgard/host.c:1.5
--- php4/ext/midgard/host.c:1.4 Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/host.c     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: host.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: host.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_host_owner)
+MGD_FUNCTION(ret_type, is_host_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
     RETVAL_LONG(ishostowner(id));
 }
 
-MGD_FUNCTION(list_hosts)
+MGD_FUNCTION(ret_type, list_hosts, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -52,7 +52,7 @@
        }
 }
 
-MGD_FUNCTION(get_host)
+MGD_FUNCTION(ret_type, get_host, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -74,7 +74,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_HOST, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_host_by_name)
+MGD_FUNCTION(ret_type, get_host_by_name, (type param))
 {
     zval **name, **prefix;
        CHECK_MGD;
@@ -92,7 +92,7 @@
                        "prefix", (*prefix)->value.str.val);
 }
 
-MGD_FUNCTION(create_host)
+MGD_FUNCTION(ret_type, create_host, (type param))
 {
        zval **name, **port, **online, **root, **style, **auth, **owner, **prefix, 
*self;
 
@@ -187,7 +187,7 @@
        PHP_CREATE_REPLIGARD("host", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_host)
+MGD_FUNCTION(ret_type, update_host, (type param))
 {
        zval **id, **name, **port, **online, **root, **style, **auth, **owner, 
**prefix, *self;
 
@@ -334,7 +334,7 @@
        mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(delete_host)
+MGD_FUNCTION(ret_type, delete_host, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/image.c
diff -u php4/ext/midgard/image.c:1.4 php4/ext/midgard/image.c:1.5
--- php4/ext/midgard/image.c:1.4        Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/image.c    Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: image.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_images)
+MGD_FUNCTION(ret_type, list_images, (type param))
 {
     RETVAL_FALSE;
        CHECK_MGD;
@@ -32,7 +32,7 @@
 }
 
 #if 0
-MGD_FUNCTION(html_image)
+MGD_FUNCTION(ret_type, html_image, (type param))
 {
     php_midgard_res *res;
     zval **id, **extra, eextra;
@@ -78,7 +78,7 @@
 }
 #endif
 
-MGD_FUNCTION(get_image)
+MGD_FUNCTION(ret_type, get_image, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -101,7 +101,7 @@
 }
 
 
-MGD_FUNCTION(create_image)
+MGD_FUNCTION(ret_type, create_image, (type param))
 {
        zval **src, **x, **y, **offline, *self;
 
@@ -139,7 +139,7 @@
        PHP_CREATE_REPLIGARD("image", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_image)
+MGD_FUNCTION(ret_type, update_image, (type param))
 {
        zval **id, **src, **x, **y, **offline, *self;
 
@@ -178,7 +178,7 @@
        PHP_UPDATE_REPLIGARD("image", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_image)
+MGD_FUNCTION(ret_type, delete_image, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/mail.c
diff -u php4/ext/midgard/mail.c:1.4 php4/ext/midgard/mail.c:1.5
--- php4/ext/midgard/mail.c:1.4 Tue Feb 20 03:14:55 2001
+++ php4/ext/midgard/mail.c     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mail.c,v 1.4 2001/02/20 11:14:55 emile Exp $
+/* $Id: mail.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -116,7 +116,7 @@
        }
 }
 
-MGD_FUNCTION(create_mail)
+MGD_FUNCTION(ret_type, create_mail, (type param))
 {
        zval **from, **to, **subject, **message;
        FILE *sendmail;
Index: php4/ext/midgard/member.c
diff -u php4/ext/midgard/member.c:1.4 php4/ext/midgard/member.c:1.5
--- php4/ext/midgard/member.c:1.4       Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/member.c   Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: member.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: member.c,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_members)
+MGD_FUNCTION(ret_type, list_members, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -32,7 +32,7 @@
                   "lastname,firstname", id);
 }
 
-MGD_FUNCTION(list_memberships)
+MGD_FUNCTION(ret_type, list_memberships, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -44,7 +44,7 @@
                   "name", id);
 }
 
-MGD_FUNCTION(get_member)
+MGD_FUNCTION(ret_type, get_member, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -69,7 +69,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_MEMBER, (*id)->value.lval);
 }
 
-MGD_FUNCTION(create_member)
+MGD_FUNCTION(ret_type, create_member, (type param))
 {
        zval **uid, **gid, **extra, *self;
 
@@ -145,7 +145,7 @@
        PHP_CREATE_REPLIGARD("member", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_member)
+MGD_FUNCTION(ret_type, update_member, (type param))
 {
        zval **id, **extra, *self;
 
@@ -180,7 +180,7 @@
        PHP_UPDATE_REPLIGARD("member", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_member)
+MGD_FUNCTION(ret_type, delete_member, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/mgd_article.h
diff -u php4/ext/midgard/mgd_article.h:1.4 php4/ext/midgard/mgd_article.h:1.5
--- php4/ext/midgard/mgd_article.h:1.4  Tue Feb 20 16:24:56 2001
+++ php4/ext/midgard/mgd_article.h      Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_article.h,v 1.4 2001/02/21 00:24:56 davidg Exp $
+/* $Id: mgd_article.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,30 +21,30 @@
 #ifndef MGD_ARTICLE_H
 #define MGD_ARTICLE_H
 
-extern MGD_FUNCTION(is_article_owner);
-extern MGD_FUNCTION(is_article_in_topic_tree);
-extern MGD_FUNCTION(list_topic_articles);
-extern MGD_FUNCTION(list_reply_articles);
-extern MGD_FUNCTION(list_topic_articles_all);
-extern MGD_FUNCTION(list_topic_articles_all_fast);
-extern MGD_FUNCTION(list_topic_articles_all_of_person);
-extern MGD_FUNCTION(get_article);
-extern MGD_FUNCTION(get_article_by_name);
-extern MGD_FUNCTION(get_reply_by_name);
-extern MGD_FUNCTION(create_article);
-extern MGD_FUNCTION(update_article_score);
-extern MGD_FUNCTION(update_article_created);
-extern MGD_FUNCTION(update_article_replyto);
-extern MGD_FUNCTION(update_article_type);
-extern MGD_FUNCTION(toggle_article_lock);
-extern MGD_FUNCTION(approve_article);
-extern MGD_FUNCTION(update_article);
-extern MGD_FUNCTION(delete_article);
-extern MGD_FUNCTION(copy_article);
-extern MGD_FUNCTION(move_article);
-extern MGD_FUNCTION(copy_reply);
-extern MGD_FUNCTION(move_reply);
-extern MGD_FUNCTION(delete_article_tree);
-extern MGD_FUNCTION(walk_article_tree);
+extern MGD_FUNCTION(ret_type, is_article_owner, (type param));
+extern MGD_FUNCTION(ret_type, is_article_in_topic_tree, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_articles, (type param));
+extern MGD_FUNCTION(ret_type, list_reply_articles, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_articles_all, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_articles_all_fast, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_articles_all_of_person, (type param));
+extern MGD_FUNCTION(ret_type, get_article, (type param));
+extern MGD_FUNCTION(ret_type, get_article_by_name, (type param));
+extern MGD_FUNCTION(ret_type, get_reply_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_article, (type param));
+extern MGD_FUNCTION(ret_type, update_article_score, (type param));
+extern MGD_FUNCTION(ret_type, update_article_created, (type param));
+extern MGD_FUNCTION(ret_type, update_article_replyto, (type param));
+extern MGD_FUNCTION(ret_type, update_article_type, (type param));
+extern MGD_FUNCTION(ret_type, toggle_article_lock, (type param));
+extern MGD_FUNCTION(ret_type, approve_article, (type param));
+extern MGD_FUNCTION(ret_type, update_article, (type param));
+extern MGD_FUNCTION(ret_type, delete_article, (type param));
+extern MGD_FUNCTION(ret_type, copy_article, (type param));
+extern MGD_FUNCTION(ret_type, move_article, (type param));
+extern MGD_FUNCTION(ret_type, copy_reply, (type param));
+extern MGD_FUNCTION(ret_type, move_reply, (type param));
+extern MGD_FUNCTION(ret_type, delete_article_tree, (type param));
+extern MGD_FUNCTION(ret_type, walk_article_tree, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_attachment.h
diff -u php4/ext/midgard/mgd_attachment.h:1.3 php4/ext/midgard/mgd_attachment.h:1.4
--- php4/ext/midgard/mgd_attachment.h:1.3       Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_attachment.h   Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_attachment.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_attachment.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,13 +21,13 @@
 #ifndef MGD_ATTACHMENT_H
 #define MGD_ATTACHMENT_H
 
-extern MGD_FUNCTION(oop_attachment_create);
-extern MGD_FUNCTION(oop_attachment_list);
-extern MGD_FUNCTION(open_attachment);
-extern MGD_FUNCTION(get_attachment);
-extern MGD_FUNCTION(serve_attachment);
-extern MGD_FUNCTION(stat_attachment);
-extern MGD_FUNCTION(delete_attachment);
-extern MGD_FUNCTION(update_attachment);
+extern MGD_FUNCTION(ret_type, oop_attachment_create, (type param));
+extern MGD_FUNCTION(ret_type, oop_attachment_list, (type param));
+extern MGD_FUNCTION(ret_type, open_attachment, (type param));
+extern MGD_FUNCTION(ret_type, get_attachment, (type param));
+extern MGD_FUNCTION(ret_type, serve_attachment, (type param));
+extern MGD_FUNCTION(ret_type, stat_attachment, (type param));
+extern MGD_FUNCTION(ret_type, delete_attachment, (type param));
+extern MGD_FUNCTION(ret_type, update_attachment, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_calendar.h
diff -u php4/ext/midgard/mgd_calendar.h:1.3 php4/ext/midgard/mgd_calendar.h:1.4
--- php4/ext/midgard/mgd_calendar.h:1.3 Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_calendar.h     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_calendar.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_calendar.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #ifndef MGD_CALENDAR_H
 #define MGD_CALENDAR_H
 
-extern MGD_FUNCTION(list_topic_calendar_all);
-extern MGD_FUNCTION(list_topic_calendar_all_fast);
+extern MGD_FUNCTION(ret_type, list_topic_calendar_all, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_calendar_all_fast, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_element.h
diff -u php4/ext/midgard/mgd_element.h:1.3 php4/ext/midgard/mgd_element.h:1.4
--- php4/ext/midgard/mgd_element.h:1.3  Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_element.h      Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_element.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_element.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,13 +21,13 @@
 #ifndef MGD_ELEMENT_H
 #define MGD_ELEMENT_H
 
-extern MGD_FUNCTION(list_elements);
-extern MGD_FUNCTION(get_element);
-extern MGD_FUNCTION(get_element_by_name);
-extern MGD_FUNCTION(create_element);
-extern MGD_FUNCTION(update_element);
-extern MGD_FUNCTION(delete_element);
-extern MGD_FUNCTION(copy_element);
-extern MGD_FUNCTION(move_element);
+extern MGD_FUNCTION(ret_type, list_elements, (type param));
+extern MGD_FUNCTION(ret_type, get_element, (type param));
+extern MGD_FUNCTION(ret_type, get_element_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_element, (type param));
+extern MGD_FUNCTION(ret_type, update_element, (type param));
+extern MGD_FUNCTION(ret_type, delete_element, (type param));
+extern MGD_FUNCTION(ret_type, copy_element, (type param));
+extern MGD_FUNCTION(ret_type, move_element, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_event.h
diff -u php4/ext/midgard/mgd_event.h:1.4 php4/ext/midgard/mgd_event.h:1.5
--- php4/ext/midgard/mgd_event.h:1.4    Thu Feb 22 06:26:31 2001
+++ php4/ext/midgard/mgd_event.h        Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_event.h,v 1.4 2001/02/22 14:26:31 davidg Exp $
+/* $Id: mgd_event.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,20 +21,20 @@
 #ifndef MGD_EVENT_H
 #define MGD_EVENT_H
 
-extern MGD_FUNCTION(is_event_owner);
-extern MGD_FUNCTION(create_event);
-extern MGD_FUNCTION(update_event);
-extern MGD_FUNCTION(delete_event);
-extern MGD_FUNCTION(delete_event_tree);
-extern MGD_FUNCTION(walk_event_tree);
-extern MGD_FUNCTION(get_event);
-extern MGD_FUNCTION(list_events);
-extern MGD_FUNCTION(list_events_between);
-extern MGD_FUNCTION(list_events_all);
-extern MGD_FUNCTION(list_events_all_between);
-extern MGD_FUNCTION(count_events_in_period);
-extern MGD_FUNCTION(count_events_in_month);
-extern MGD_FUNCTION(copy_event);
-extern MGD_FUNCTION(move_event);
+extern MGD_FUNCTION(ret_type, is_event_owner, (type param));
+extern MGD_FUNCTION(ret_type, create_event, (type param));
+extern MGD_FUNCTION(ret_type, update_event, (type param));
+extern MGD_FUNCTION(ret_type, delete_event, (type param));
+extern MGD_FUNCTION(ret_type, delete_event_tree, (type param));
+extern MGD_FUNCTION(ret_type, walk_event_tree, (type param));
+extern MGD_FUNCTION(ret_type, get_event, (type param));
+extern MGD_FUNCTION(ret_type, list_events, (type param));
+extern MGD_FUNCTION(ret_type, list_events_between, (type param));
+extern MGD_FUNCTION(ret_type, list_events_all, (type param));
+extern MGD_FUNCTION(ret_type, list_events_all_between, (type param));
+extern MGD_FUNCTION(ret_type, count_events_in_period, (type param));
+extern MGD_FUNCTION(ret_type, count_events_in_month, (type param));
+extern MGD_FUNCTION(ret_type, copy_event, (type param));
+extern MGD_FUNCTION(ret_type, move_event, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_eventmember.h
diff -u php4/ext/midgard/mgd_eventmember.h:1.3 php4/ext/midgard/mgd_eventmember.h:1.4
--- php4/ext/midgard/mgd_eventmember.h:1.3      Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_eventmember.h  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_eventmember.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_eventmember.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,11 +21,11 @@
 #ifndef MGD_EVENTMEMBER_H
 #define MGD_EVENTMEMBER_H
 
-extern MGD_FUNCTION(create_event_member);
-extern MGD_FUNCTION(update_event_member);
-extern MGD_FUNCTION(delete_event_member);
-extern MGD_FUNCTION(get_event_member);
-extern MGD_FUNCTION(list_event_members);
-extern MGD_FUNCTION(count_event_members);
+extern MGD_FUNCTION(ret_type, create_event_member, (type param));
+extern MGD_FUNCTION(ret_type, update_event_member, (type param));
+extern MGD_FUNCTION(ret_type, delete_event_member, (type param));
+extern MGD_FUNCTION(ret_type, get_event_member, (type param));
+extern MGD_FUNCTION(ret_type, list_event_members, (type param));
+extern MGD_FUNCTION(ret_type, count_event_members, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_file.h
diff -u php4/ext/midgard/mgd_file.h:1.3 php4/ext/midgard/mgd_file.h:1.4
--- php4/ext/midgard/mgd_file.h:1.3     Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_file.h Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_file.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_file.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,10 +21,10 @@
 #ifndef MGD_FILE_H
 #define MGD_FILE_H
 
-extern MGD_FUNCTION(list_files);
-extern MGD_FUNCTION(get_file);
-extern MGD_FUNCTION(create_file);
-extern MGD_FUNCTION(update_file);
-extern MGD_FUNCTION(delete_file);
+extern MGD_FUNCTION(ret_type, list_files, (type param));
+extern MGD_FUNCTION(ret_type, get_file, (type param));
+extern MGD_FUNCTION(ret_type, create_file, (type param));
+extern MGD_FUNCTION(ret_type, update_file, (type param));
+extern MGD_FUNCTION(ret_type, delete_file, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_group.h
diff -u php4/ext/midgard/mgd_group.h:1.4 php4/ext/midgard/mgd_group.h:1.5
--- php4/ext/midgard/mgd_group.h:1.4    Thu Feb 22 09:39:37 2001
+++ php4/ext/midgard/mgd_group.h        Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_group.h,v 1.4 2001/02/22 17:39:37 davidg Exp $
+/* $Id: mgd_group.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,13 +21,13 @@
 #ifndef MGD_GROUP_H
 #define MGD_GROUP_H
 
-extern MGD_FUNCTION(is_group_owner);
-extern MGD_FUNCTION(list_groups);
-extern MGD_FUNCTION(get_group);
-extern MGD_FUNCTION(get_group_by_name);
-extern MGD_FUNCTION(create_group);
-extern MGD_FUNCTION(update_group);
-extern MGD_FUNCTION(delete_group);
-extern MGD_FUNCTION(walk_group_tree);
+extern MGD_FUNCTION(ret_type, is_group_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_groups, (type param));
+extern MGD_FUNCTION(ret_type, get_group, (type param));
+extern MGD_FUNCTION(ret_type, get_group_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_group, (type param));
+extern MGD_FUNCTION(ret_type, update_group, (type param));
+extern MGD_FUNCTION(ret_type, delete_group, (type param));
+extern MGD_FUNCTION(ret_type, walk_group_tree, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_host.h
diff -u php4/ext/midgard/mgd_host.h:1.3 php4/ext/midgard/mgd_host.h:1.4
--- php4/ext/midgard/mgd_host.h:1.3     Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_host.h Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_host.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_host.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,12 +21,12 @@
 #ifndef MGD_HOST_H
 #define MGD_HOST_H
 
-extern MGD_FUNCTION(is_host_owner);
-extern MGD_FUNCTION(list_hosts);
-extern MGD_FUNCTION(get_host);
-extern MGD_FUNCTION(get_host_by_name);
-extern MGD_FUNCTION(create_host);
-extern MGD_FUNCTION(update_host);
-extern MGD_FUNCTION(delete_host);
+extern MGD_FUNCTION(ret_type, is_host_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_hosts, (type param));
+extern MGD_FUNCTION(ret_type, get_host, (type param));
+extern MGD_FUNCTION(ret_type, get_host_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_host, (type param));
+extern MGD_FUNCTION(ret_type, update_host, (type param));
+extern MGD_FUNCTION(ret_type, delete_host, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_image.h
diff -u php4/ext/midgard/mgd_image.h:1.3 php4/ext/midgard/mgd_image.h:1.4
--- php4/ext/midgard/mgd_image.h:1.3    Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_image.h        Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_image.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_image.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,11 +21,11 @@
 #ifndef MGD_IMAGE_H
 #define MGD_IMAGE_H
 
-extern MGD_FUNCTION(list_images);
-extern MGD_FUNCTION(html_image);
-extern MGD_FUNCTION(get_image);
-extern MGD_FUNCTION(create_image);
-extern MGD_FUNCTION(update_image);
-extern MGD_FUNCTION(delete_image);
+extern MGD_FUNCTION(ret_type, list_images, (type param));
+extern MGD_FUNCTION(ret_type, html_image, (type param));
+extern MGD_FUNCTION(ret_type, get_image, (type param));
+extern MGD_FUNCTION(ret_type, create_image, (type param));
+extern MGD_FUNCTION(ret_type, update_image, (type param));
+extern MGD_FUNCTION(ret_type, delete_image, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_internal.h
diff -u php4/ext/midgard/mgd_internal.h:1.7 php4/ext/midgard/mgd_internal.h:1.8
--- php4/ext/midgard/mgd_internal.h:1.7 Sat Feb 24 13:12:11 2001
+++ php4/ext/midgard/mgd_internal.h     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_internal.h,v 1.7 2001/02/24 21:12:11 davidg Exp $
+/* $Id: mgd_internal.h,v 1.8 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -45,7 +45,7 @@
       mgd_reset_errno(); \
    } while (0);
 
-#define MGD_FUNCTION(name) \
+#define MGD_FUNCTION(ret, name, param) \
    PHP_FUNCTION(mgd_##name)
 
 #define MGD_FE(name, arg_types) \
@@ -96,7 +96,7 @@
    UPDATE_REPLIGARD(mgd_handle(), table, id)
 
 #define MGD_MOVE_FUNCTION(table,roottable,name,rootname) \
-MGD_FUNCTION(move_##name) \
+MGD_FUNCTION(int, move_##name, (int id, int root)) \
 { \
    zval **id, **root; \
    RETVAL_FALSE; \
@@ -119,7 +119,7 @@
 #define MGD_WALK_FUNCTION_EX(type, table, upfield) \
 /* {{{ proto void walk_ ## type ## _tree(string func, id, level, xparam[[, order], 
sort]) \
 */ \
-MGD_FUNCTION(walk_ ## type ## _tree) \
+MGD_FUNCTION(void, walk_ ## type ## _tree,(string func, int id, int level, mixed 
+&xparam[, order[, sort]])) \
 { \
    zval **id, **level, **xparam, *xp[2], **order; \
        zval **midgard_user_call_func_name, **sort = NULL; \
Index: php4/ext/midgard/mgd_mail.h
diff -u php4/ext/midgard/mgd_mail.h:1.3 php4/ext/midgard/mgd_mail.h:1.4
--- php4/ext/midgard/mgd_mail.h:1.3     Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_mail.h Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_mail.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_mail.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,6 +21,6 @@
 #ifndef MGD_MAIL_H
 #define MGD_MAIL_H
 
-extern MGD_FUNCTION(create_mail);
+extern MGD_FUNCTION(ret_type, create_mail, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_member.h
diff -u php4/ext/midgard/mgd_member.h:1.3 php4/ext/midgard/mgd_member.h:1.4
--- php4/ext/midgard/mgd_member.h:1.3   Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_member.h       Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_member.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_member.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,11 +21,11 @@
 #ifndef MGD_MEMBER_H
 #define MGD_MEMBER_H
 
-extern MGD_FUNCTION(list_members);
-extern MGD_FUNCTION(list_memberships);
-extern MGD_FUNCTION(get_member);
-extern MGD_FUNCTION(create_member);
-extern MGD_FUNCTION(update_member);
-extern MGD_FUNCTION(delete_member);
+extern MGD_FUNCTION(ret_type, list_members, (type param));
+extern MGD_FUNCTION(ret_type, list_memberships, (type param));
+extern MGD_FUNCTION(ret_type, get_member, (type param));
+extern MGD_FUNCTION(ret_type, create_member, (type param));
+extern MGD_FUNCTION(ret_type, update_member, (type param));
+extern MGD_FUNCTION(ret_type, delete_member, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_oop.h
diff -u php4/ext/midgard/mgd_oop.h:1.4 php4/ext/midgard/mgd_oop.h:1.5
--- php4/ext/midgard/mgd_oop.h:1.4      Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/mgd_oop.h  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_oop.h,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: mgd_oop.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -24,108 +24,108 @@
 #include <zend.h>
 #include <midgard/tablenames.h>
 
-MGD_FUNCTION(oop_parameter);
-MGD_FUNCTION(oop_parameter_list);
-MGD_FUNCTION(oop_parameter_search);
-
-MGD_FUNCTION(get_attachment);
-MGD_FUNCTION(oop_attachment_create);
-MGD_FUNCTION(oop_attachment_list);
-MGD_FUNCTION(open_attachment);
-MGD_FUNCTION(serve_attachment);
-MGD_FUNCTION(delete_attachment);
-MGD_FUNCTION(update_attachment);
+MGD_FUNCTION(ret_type, oop_parameter, (type param));
+MGD_FUNCTION(ret_type, oop_parameter_list, (type param));
+MGD_FUNCTION(ret_type, oop_parameter_search, (type param));
+
+MGD_FUNCTION(ret_type, get_attachment, (type param));
+MGD_FUNCTION(ret_type, oop_attachment_create, (type param));
+MGD_FUNCTION(ret_type, oop_attachment_list, (type param));
+MGD_FUNCTION(ret_type, open_attachment, (type param));
+MGD_FUNCTION(ret_type, serve_attachment, (type param));
+MGD_FUNCTION(ret_type, delete_attachment, (type param));
+MGD_FUNCTION(ret_type, update_attachment, (type param));
 
-MGD_FUNCTION(oop_guid_get);
+MGD_FUNCTION(ret_type, oop_guid_get, (type param));
 
-MGD_FUNCTION(oop_list_fetch);
+MGD_FUNCTION(ret_type, oop_list_fetch, (type param));
 
 // DG: are all these oop_xxxx_create functions actually exist ?
-MGD_FUNCTION(oop_element_create);
-MGD_FUNCTION(delete_element);
-MGD_FUNCTION(update_element);
-
-MGD_FUNCTION(oop_group_create);
-MGD_FUNCTION(delete_group);
-MGD_FUNCTION(update_group);
-
-MGD_FUNCTION(oop_article_create);
-MGD_FUNCTION(oop_article_score);
-MGD_FUNCTION(delete_article);
-MGD_FUNCTION(update_article);
-
-MGD_FUNCTION(oop_topic_create);
-MGD_FUNCTION(oop_topic_score);
-MGD_FUNCTION(delete_topic);
-MGD_FUNCTION(update_topic);
-
-MGD_FUNCTION(oop_file_create);
-MGD_FUNCTION(delete_file);
-MGD_FUNCTION(update_file);
-
-MGD_FUNCTION(oop_host_create);
-MGD_FUNCTION(delete_host);
-MGD_FUNCTION(update_host);
-
-MGD_FUNCTION(oop_image_create);
-MGD_FUNCTION(delete_image);
-MGD_FUNCTION(update_image);
-
-MGD_FUNCTION(oop_member_create);
-MGD_FUNCTION(delete_member);
-MGD_FUNCTION(update_member);
-
-MGD_FUNCTION(oop_person_create);
-MGD_FUNCTION(delete_person);
-MGD_FUNCTION(update_person);
-
-MGD_FUNCTION(oop_preference_create);
-MGD_FUNCTION(delete_preference);
-MGD_FUNCTION(update_preference);
-
-MGD_FUNCTION(oop_page_create);
-MGD_FUNCTION(delete_page);
-MGD_FUNCTION(update_page);
+MGD_FUNCTION(ret_type, oop_element_create, (type param));
+MGD_FUNCTION(ret_type, delete_element, (type param));
+MGD_FUNCTION(ret_type, update_element, (type param));
+
+MGD_FUNCTION(ret_type, oop_group_create, (type param));
+MGD_FUNCTION(ret_type, delete_group, (type param));
+MGD_FUNCTION(ret_type, update_group, (type param));
+
+MGD_FUNCTION(ret_type, oop_article_create, (type param));
+MGD_FUNCTION(ret_type, oop_article_score, (type param));
+MGD_FUNCTION(ret_type, delete_article, (type param));
+MGD_FUNCTION(ret_type, update_article, (type param));
+
+MGD_FUNCTION(ret_type, oop_topic_create, (type param));
+MGD_FUNCTION(ret_type, oop_topic_score, (type param));
+MGD_FUNCTION(ret_type, delete_topic, (type param));
+MGD_FUNCTION(ret_type, update_topic, (type param));
+
+MGD_FUNCTION(ret_type, oop_file_create, (type param));
+MGD_FUNCTION(ret_type, delete_file, (type param));
+MGD_FUNCTION(ret_type, update_file, (type param));
+
+MGD_FUNCTION(ret_type, oop_host_create, (type param));
+MGD_FUNCTION(ret_type, delete_host, (type param));
+MGD_FUNCTION(ret_type, update_host, (type param));
+
+MGD_FUNCTION(ret_type, oop_image_create, (type param));
+MGD_FUNCTION(ret_type, delete_image, (type param));
+MGD_FUNCTION(ret_type, update_image, (type param));
+
+MGD_FUNCTION(ret_type, oop_member_create, (type param));
+MGD_FUNCTION(ret_type, delete_member, (type param));
+MGD_FUNCTION(ret_type, update_member, (type param));
+
+MGD_FUNCTION(ret_type, oop_person_create, (type param));
+MGD_FUNCTION(ret_type, delete_person, (type param));
+MGD_FUNCTION(ret_type, update_person, (type param));
+
+MGD_FUNCTION(ret_type, oop_preference_create, (type param));
+MGD_FUNCTION(ret_type, delete_preference, (type param));
+MGD_FUNCTION(ret_type, update_preference, (type param));
+
+MGD_FUNCTION(ret_type, oop_page_create, (type param));
+MGD_FUNCTION(ret_type, delete_page, (type param));
+MGD_FUNCTION(ret_type, update_page, (type param));
 
 #if HAVE_MIDGARD_PAGELINKS
-MGD_FUNCTION(oop_pagelink_create);
-MGD_FUNCTION(delete_pagelink);
-MGD_FUNCTION(update_pagelink);
+MGD_FUNCTION(ret_type, oop_pagelink_create, (type param));
+MGD_FUNCTION(ret_type, delete_pagelink, (type param));
+MGD_FUNCTION(ret_type, update_pagelink, (type param));
 #endif
 
-MGD_FUNCTION(oop_event_create);
-MGD_FUNCTION(delete_event);
-MGD_FUNCTION(update_event);
-MGD_FUNCTION(oop_event_member_create);
-MGD_FUNCTION(delete_event_member);
-MGD_FUNCTION(update_event_member);
+MGD_FUNCTION(ret_type, oop_event_create, (type param));
+MGD_FUNCTION(ret_type, delete_event, (type param));
+MGD_FUNCTION(ret_type, update_event, (type param));
+MGD_FUNCTION(ret_type, oop_event_member_create, (type param));
+MGD_FUNCTION(ret_type, delete_event_member, (type param));
+MGD_FUNCTION(ret_type, update_event_member, (type param));
 
 #if HAVE_MIDGARD_SITEGROUPS
-MGD_FUNCTION(oop_sitegroup_set);
-MGD_FUNCTION(oop_sitegroup_get);
+MGD_FUNCTION(ret_type, oop_sitegroup_set, (type param));
+MGD_FUNCTION(ret_type, oop_sitegroup_get, (type param));
 
-MGD_FUNCTION(create_sitegroup);
-MGD_FUNCTION(delete_sitegroup);
-MGD_FUNCTION(update_sitegroup);
+MGD_FUNCTION(ret_type, create_sitegroup, (type param));
+MGD_FUNCTION(ret_type, delete_sitegroup, (type param));
+MGD_FUNCTION(ret_type, update_sitegroup, (type param));
 #endif
 
-MGD_FUNCTION(oop_style_create);
-MGD_FUNCTION(delete_style);
-MGD_FUNCTION(update_style);
-
-MGD_FUNCTION(oop_pageelement_create);
-MGD_FUNCTION(delete_pageelement);
-MGD_FUNCTION(update_pageelement);
-
-MGD_FUNCTION(oop_snippetdir_create);
-MGD_FUNCTION(delete_snippetdir);
-MGD_FUNCTION(update_snippetdir);
-
-MGD_FUNCTION(oop_snippet_create);
-MGD_FUNCTION(delete_snippet);
-MGD_FUNCTION(update_snippet);
+MGD_FUNCTION(ret_type, oop_style_create, (type param));
+MGD_FUNCTION(ret_type, delete_style, (type param));
+MGD_FUNCTION(ret_type, update_style, (type param));
+
+MGD_FUNCTION(ret_type, oop_pageelement_create, (type param));
+MGD_FUNCTION(ret_type, delete_pageelement, (type param));
+MGD_FUNCTION(ret_type, update_pageelement, (type param));
+
+MGD_FUNCTION(ret_type, oop_snippetdir_create, (type param));
+MGD_FUNCTION(ret_type, delete_snippetdir, (type param));
+MGD_FUNCTION(ret_type, update_snippetdir, (type param));
+
+MGD_FUNCTION(ret_type, oop_snippet_create, (type param));
+MGD_FUNCTION(ret_type, delete_snippet, (type param));
+MGD_FUNCTION(ret_type, update_snippet, (type param));
 
-MGD_FUNCTION(get_object_by_guid);
+MGD_FUNCTION(ret_type, get_object_by_guid, (type param));
 
 typedef struct {
        int type;
@@ -272,7 +272,7 @@
 zval mgd_ ## type ## _get_property_handler(zend_property_reference 
*property_reference); \
 int mgd_ ## type ## _set_property_handler(zend_property_reference 
*property_reference, \
                                                zval *value); \
-MGD_FUNCTION(ctor_ ## type);
+MGD_FUNCTION(ret_type, ctor_ ## type, (type param));
 
 #define MIDGARD_HANDLERS(name, type) \
 void mgd_ ## type ## _call_function_handler(INTERNAL_FUNCTION_PARAMETERS, \
@@ -342,7 +342,7 @@
        /* TODO: test result to know if we return SUCCESS or FAILURE */ \
        return SUCCESS; \
 } \
-MGD_FUNCTION(ctor_ ## type) \
+MGD_FUNCTION(void, ctor_ ## type, (void)) \
 { \
        if ((return_value = getThis()) == NULL) { \
                RETURN_FALSE_BECAUSE(MGD_ERR_NOT_OBJECT); \
Index: php4/ext/midgard/mgd_page.h
diff -u php4/ext/midgard/mgd_page.h:1.4 php4/ext/midgard/mgd_page.h:1.5
--- php4/ext/midgard/mgd_page.h:1.4     Tue Feb 20 16:24:56 2001
+++ php4/ext/midgard/mgd_page.h Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_page.h,v 1.4 2001/02/21 00:24:56 davidg Exp $
+/* $Id: mgd_page.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,18 +21,18 @@
 #ifndef MGD_PAGE_H
 #define MGD_PAGE_H
 
-extern MGD_FUNCTION(is_page_owner);
-extern MGD_FUNCTION(copy_page);
-extern MGD_FUNCTION(move_page);
-extern MGD_FUNCTION(list_pages);
-extern MGD_FUNCTION(is_in_page_tree);
-extern MGD_FUNCTION(get_page);
-extern MGD_FUNCTION(get_page_by_name);
-extern MGD_FUNCTION(create_page);
-extern MGD_FUNCTION(update_page);
-extern MGD_FUNCTION(delete_page);
-extern MGD_FUNCTION(page_has_children);
-extern MGD_FUNCTION(delete_page_tree);
-extern MGD_FUNCTION(walk_page_tree);
+extern MGD_FUNCTION(ret_type, is_page_owner, (type param));
+extern MGD_FUNCTION(ret_type, copy_page, (type param));
+extern MGD_FUNCTION(ret_type, move_page, (type param));
+extern MGD_FUNCTION(ret_type, list_pages, (type param));
+extern MGD_FUNCTION(ret_type, is_in_page_tree, (type param));
+extern MGD_FUNCTION(ret_type, get_page, (type param));
+extern MGD_FUNCTION(ret_type, get_page_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_page, (type param));
+extern MGD_FUNCTION(ret_type, update_page, (type param));
+extern MGD_FUNCTION(ret_type, delete_page, (type param));
+extern MGD_FUNCTION(ret_type, page_has_children, (type param));
+extern MGD_FUNCTION(ret_type, delete_page_tree, (type param));
+extern MGD_FUNCTION(ret_type, walk_page_tree, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_pageelement.h
diff -u php4/ext/midgard/mgd_pageelement.h:1.3 php4/ext/midgard/mgd_pageelement.h:1.4
--- php4/ext/midgard/mgd_pageelement.h:1.3      Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_pageelement.h  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_pageelement.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_pageelement.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,13 +21,13 @@
 #ifndef MGD_PAGEELEMENT_H
 #define MGD_PAGEELEMENT_H
 
-extern MGD_FUNCTION(list_page_elements);
-extern MGD_FUNCTION(get_page_element);
-extern MGD_FUNCTION(get_page_element_by_name);
-extern MGD_FUNCTION(create_page_element);
-extern MGD_FUNCTION(update_page_element);
-extern MGD_FUNCTION(delete_page_element);
-extern MGD_FUNCTION(copy_page_element);
-extern MGD_FUNCTION(move_page_element);
+extern MGD_FUNCTION(ret_type, list_page_elements, (type param));
+extern MGD_FUNCTION(ret_type, get_page_element, (type param));
+extern MGD_FUNCTION(ret_type, get_page_element_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_page_element, (type param));
+extern MGD_FUNCTION(ret_type, update_page_element, (type param));
+extern MGD_FUNCTION(ret_type, delete_page_element, (type param));
+extern MGD_FUNCTION(ret_type, copy_page_element, (type param));
+extern MGD_FUNCTION(ret_type, move_page_element, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_pagelink.h
diff -u php4/ext/midgard/mgd_pagelink.h:1.3 php4/ext/midgard/mgd_pagelink.h:1.4
--- php4/ext/midgard/mgd_pagelink.h:1.3 Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_pagelink.h     Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_pagelink.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_pagelink.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #ifndef MGD_PAGELINK_H
 #define MGD_PAGELINK_H
 
-extern MGD_FUNCTION(has_pagelinks);
-extern MGD_FUNCTION(is_pagelink_owner);
-extern MGD_FUNCTION(list_pagelinks);
-extern MGD_FUNCTION(list_pagelinks_targeted_at);
-extern MGD_FUNCTION(get_pagelink);
-extern MGD_FUNCTION(get_pagelink_by_name);
-extern MGD_FUNCTION(create_pagelink);
-extern MGD_FUNCTION(update_pagelink);
-extern MGD_FUNCTION(delete_pagelink);
+extern MGD_FUNCTION(ret_type, has_pagelinks, (type param));
+extern MGD_FUNCTION(ret_type, is_pagelink_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_pagelinks, (type param));
+extern MGD_FUNCTION(ret_type, list_pagelinks_targeted_at, (type param));
+extern MGD_FUNCTION(ret_type, get_pagelink, (type param));
+extern MGD_FUNCTION(ret_type, get_pagelink_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_pagelink, (type param));
+extern MGD_FUNCTION(ret_type, update_pagelink, (type param));
+extern MGD_FUNCTION(ret_type, delete_pagelink, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_person.h
diff -u php4/ext/midgard/mgd_person.h:1.3 php4/ext/midgard/mgd_person.h:1.4
--- php4/ext/midgard/mgd_person.h:1.3   Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_person.h       Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_person.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_person.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,20 +21,20 @@
 #ifndef MGD_PERSON_H
 #define MGD_PERSON_H
 
-extern MGD_FUNCTION(is_person_owner);
-extern MGD_FUNCTION(is_member);
-extern MGD_FUNCTION(list_persons);
-extern MGD_FUNCTION(list_persons_in_department);
-extern MGD_FUNCTION(list_topic_persons);
-extern MGD_FUNCTION(list_persons_in_department_all);
-extern MGD_FUNCTION(list_topic_persons_all);
-extern MGD_FUNCTION(list_persons_in_office);
-extern MGD_FUNCTION(get_person);
-extern MGD_FUNCTION(create_person);
-extern MGD_FUNCTION(update_person);
-extern MGD_FUNCTION(update_password);
-extern MGD_FUNCTION(update_password_plain);
-extern MGD_FUNCTION(update_public);
-extern MGD_FUNCTION(delete_person);
+extern MGD_FUNCTION(ret_type, is_person_owner, (type param));
+extern MGD_FUNCTION(ret_type, is_member, (type param));
+extern MGD_FUNCTION(ret_type, list_persons, (type param));
+extern MGD_FUNCTION(ret_type, list_persons_in_department, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_persons, (type param));
+extern MGD_FUNCTION(ret_type, list_persons_in_department_all, (type param));
+extern MGD_FUNCTION(ret_type, list_topic_persons_all, (type param));
+extern MGD_FUNCTION(ret_type, list_persons_in_office, (type param));
+extern MGD_FUNCTION(ret_type, get_person, (type param));
+extern MGD_FUNCTION(ret_type, create_person, (type param));
+extern MGD_FUNCTION(ret_type, update_person, (type param));
+extern MGD_FUNCTION(ret_type, update_password, (type param));
+extern MGD_FUNCTION(ret_type, update_password_plain, (type param));
+extern MGD_FUNCTION(ret_type, update_public, (type param));
+extern MGD_FUNCTION(ret_type, delete_person, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_preferences.h
diff -u php4/ext/midgard/mgd_preferences.h:1.3 php4/ext/midgard/mgd_preferences.h:1.4
--- php4/ext/midgard/mgd_preferences.h:1.3      Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_preferences.h  Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_preferences.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_preferences.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,10 +21,10 @@
 #ifndef MGD_PREFERENCES_H
 #define MGD_PREFERENCES_H
 
-extern MGD_FUNCTION(list_preferences);
-extern MGD_FUNCTION(get_preference);
-extern MGD_FUNCTION(create_preference);
-extern MGD_FUNCTION(update_preference);
-extern MGD_FUNCTION(delete_preference);
+extern MGD_FUNCTION(ret_type, list_preferences, (type param));
+extern MGD_FUNCTION(ret_type, get_preference, (type param));
+extern MGD_FUNCTION(ret_type, create_preference, (type param));
+extern MGD_FUNCTION(ret_type, update_preference, (type param));
+extern MGD_FUNCTION(ret_type, delete_preference, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_preparser.h
diff -u php4/ext/midgard/mgd_preparser.h:1.5 php4/ext/midgard/mgd_preparser.h:1.6
--- php4/ext/midgard/mgd_preparser.h:1.5        Fri Feb 23 16:48:43 2001
+++ php4/ext/midgard/mgd_preparser.h    Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_preparser.h,v 1.5 2001/02/24 00:48:43 davidg Exp $
+/* $Id: mgd_preparser.h,v 1.6 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -24,11 +24,11 @@
 #include "midgard/midgard.h"
 #include <glib.h>
 
-extern MGD_FUNCTION(template);
-extern MGD_FUNCTION(variable);
-extern MGD_FUNCTION(snippet);
-extern MGD_FUNCTION(eval);
-extern MGD_FUNCTION(register_filter);
+extern MGD_FUNCTION(ret_type, template, (type param));
+extern MGD_FUNCTION(ret_type, variable, (type param));
+extern MGD_FUNCTION(ret_type, snippet, (type param));
+extern MGD_FUNCTION(ret_type, eval, (type param));
+extern MGD_FUNCTION(ret_type, register_filter, (type param));
 char * php_midgard_variable(midgard_pool * pool, char * name, char * member, char * 
type);
 char * php_eval_midgard(midgard_pool * pool, const char *name, char *value, int 
exit_php);
 int mgdparse(void);
Index: php4/ext/midgard/mgd_sitegroup.h
diff -u php4/ext/midgard/mgd_sitegroup.h:1.3 php4/ext/midgard/mgd_sitegroup.h:1.4
--- php4/ext/midgard/mgd_sitegroup.h:1.3        Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_sitegroup.h    Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_sitegroup.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_sitegroup.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,11 +21,11 @@
 #ifndef MGD_SITEGROUP_H
 #define MGD_SITEGROUP_H
 
-extern MGD_FUNCTION(has_sitegroups);
-extern MGD_FUNCTION(list_sitegroups);
-extern MGD_FUNCTION(create_sitegroup);
-extern MGD_FUNCTION(get_sitegroup);
-extern MGD_FUNCTION(update_sitegroup);
-extern MGD_FUNCTION(delete_sitegroup);
+extern MGD_FUNCTION(ret_type, has_sitegroups, (type param));
+extern MGD_FUNCTION(ret_type, list_sitegroups, (type param));
+extern MGD_FUNCTION(ret_type, create_sitegroup, (type param));
+extern MGD_FUNCTION(ret_type, get_sitegroup, (type param));
+extern MGD_FUNCTION(ret_type, update_sitegroup, (type param));
+extern MGD_FUNCTION(ret_type, delete_sitegroup, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_snippet.h
diff -u php4/ext/midgard/mgd_snippet.h:1.3 php4/ext/midgard/mgd_snippet.h:1.4
--- php4/ext/midgard/mgd_snippet.h:1.3  Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/mgd_snippet.h      Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_snippet.h,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: mgd_snippet.h,v 1.4 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #ifndef MGD_SNIPPET_H
 #define MGD_SNIPPET_H
 
-extern MGD_FUNCTION(snippet_exists);
-extern MGD_FUNCTION(list_snippets);
-extern MGD_FUNCTION(get_snippet);
-extern MGD_FUNCTION(get_snippet_by_name);
-extern MGD_FUNCTION(create_snippet);
-extern MGD_FUNCTION(update_snippet);
-extern MGD_FUNCTION(delete_snippet);
-extern MGD_FUNCTION(copy_snippet);
-extern MGD_FUNCTION(move_snippet);
+extern MGD_FUNCTION(ret_type, snippet_exists, (type param));
+extern MGD_FUNCTION(ret_type, list_snippets, (type param));
+extern MGD_FUNCTION(ret_type, get_snippet, (type param));
+extern MGD_FUNCTION(ret_type, get_snippet_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_snippet, (type param));
+extern MGD_FUNCTION(ret_type, update_snippet, (type param));
+extern MGD_FUNCTION(ret_type, delete_snippet, (type param));
+extern MGD_FUNCTION(ret_type, copy_snippet, (type param));
+extern MGD_FUNCTION(ret_type, move_snippet, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_snippetdir.h
diff -u php4/ext/midgard/mgd_snippetdir.h:1.4 php4/ext/midgard/mgd_snippetdir.h:1.5
--- php4/ext/midgard/mgd_snippetdir.h:1.4       Tue Feb 20 16:24:56 2001
+++ php4/ext/midgard/mgd_snippetdir.h   Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_snippetdir.h,v 1.4 2001/02/21 00:24:56 davidg Exp $
+/* $Id: mgd_snippetdir.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,16 +21,16 @@
 #ifndef MGD_SNIPPETDIR_H
 #define MGD_SNIPPETDIR_H
 
-extern MGD_FUNCTION(is_snippetdir_owner);
-extern MGD_FUNCTION(list_snippetdirs);
-extern MGD_FUNCTION(get_snippetdir);
-extern MGD_FUNCTION(get_snippetdir_by_path);
-extern MGD_FUNCTION(create_snippetdir);
-extern MGD_FUNCTION(update_snippetdir);
-extern MGD_FUNCTION(delete_snippetdir);
-extern MGD_FUNCTION(delete_snippetdir_tree);
-extern MGD_FUNCTION(walk_snippetdir_tree);
-extern MGD_FUNCTION(copy_snippetdir);
-extern MGD_FUNCTION(move_snippetdir);
+extern MGD_FUNCTION(ret_type, is_snippetdir_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_snippetdirs, (type param));
+extern MGD_FUNCTION(ret_type, get_snippetdir, (type param));
+extern MGD_FUNCTION(ret_type, get_snippetdir_by_path, (type param));
+extern MGD_FUNCTION(ret_type, create_snippetdir, (type param));
+extern MGD_FUNCTION(ret_type, update_snippetdir, (type param));
+extern MGD_FUNCTION(ret_type, delete_snippetdir, (type param));
+extern MGD_FUNCTION(ret_type, delete_snippetdir_tree, (type param));
+extern MGD_FUNCTION(ret_type, walk_snippetdir_tree, (type param));
+extern MGD_FUNCTION(ret_type, copy_snippetdir, (type param));
+extern MGD_FUNCTION(ret_type, move_snippetdir, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_style.h
diff -u php4/ext/midgard/mgd_style.h:1.4 php4/ext/midgard/mgd_style.h:1.5
--- php4/ext/midgard/mgd_style.h:1.4    Tue Feb 20 16:24:56 2001
+++ php4/ext/midgard/mgd_style.h        Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_style.h,v 1.4 2001/02/21 00:24:56 davidg Exp $
+/* $Id: mgd_style.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,16 +21,16 @@
 #ifndef MGD_STYLE_H
 #define MGD_STYLE_H
 
-extern MGD_FUNCTION(walk_style_tree);
-extern MGD_FUNCTION(is_style_owner);
-extern MGD_FUNCTION(list_styles);
-extern MGD_FUNCTION(get_style);
-extern MGD_FUNCTION(get_style_by_name);
-extern MGD_FUNCTION(create_style);
-extern MGD_FUNCTION(update_style);
-extern MGD_FUNCTION(delete_style);
-extern MGD_FUNCTION(copy_style);
-extern MGD_FUNCTION(move_style);
-extern MGD_FUNCTION(delete_style_tree);
+extern MGD_FUNCTION(ret_type, walk_style_tree, (type param));
+extern MGD_FUNCTION(ret_type, is_style_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_styles, (type param));
+extern MGD_FUNCTION(ret_type, get_style, (type param));
+extern MGD_FUNCTION(ret_type, get_style_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_style, (type param));
+extern MGD_FUNCTION(ret_type, update_style, (type param));
+extern MGD_FUNCTION(ret_type, delete_style, (type param));
+extern MGD_FUNCTION(ret_type, copy_style, (type param));
+extern MGD_FUNCTION(ret_type, move_style, (type param));
+extern MGD_FUNCTION(ret_type, delete_style_tree, (type param));
 
 #endif
Index: php4/ext/midgard/mgd_topic.h
diff -u php4/ext/midgard/mgd_topic.h:1.4 php4/ext/midgard/mgd_topic.h:1.5
--- php4/ext/midgard/mgd_topic.h:1.4    Tue Feb 20 16:24:56 2001
+++ php4/ext/midgard/mgd_topic.h        Tue Feb 27 17:00:31 2001
@@ -1,4 +1,4 @@
-/* $Id: mgd_topic.h,v 1.4 2001/02/21 00:24:56 davidg Exp $
+/* $Id: mgd_topic.h,v 1.5 2001/02/28 01:00:31 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,18 +21,18 @@
 #ifndef MGD_TOPCC_H
 #define MGD_TOPIC_H
 
-extern MGD_FUNCTION(is_topic_owner);
-extern MGD_FUNCTION(list_topics);
-extern MGD_FUNCTION(is_in_topic_tree);
-extern MGD_FUNCTION(get_topic);
-extern MGD_FUNCTION(get_topic_by_name);
-extern MGD_FUNCTION(create_topic);
-extern MGD_FUNCTION(update_topic);
-extern MGD_FUNCTION(update_topic_score);
-extern MGD_FUNCTION(delete_topic);
-extern MGD_FUNCTION(copy_topic);
-extern MGD_FUNCTION(move_topic);
-extern MGD_FUNCTION(delete_topic_tree);
-extern MGD_FUNCTION(walk_topic_tree);
+extern MGD_FUNCTION(ret_type, is_topic_owner, (type param));
+extern MGD_FUNCTION(ret_type, list_topics, (type param));
+extern MGD_FUNCTION(ret_type, is_in_topic_tree, (type param));
+extern MGD_FUNCTION(ret_type, get_topic, (type param));
+extern MGD_FUNCTION(ret_type, get_topic_by_name, (type param));
+extern MGD_FUNCTION(ret_type, create_topic, (type param));
+extern MGD_FUNCTION(ret_type, update_topic, (type param));
+extern MGD_FUNCTION(ret_type, update_topic_score, (type param));
+extern MGD_FUNCTION(ret_type, delete_topic, (type param));
+extern MGD_FUNCTION(ret_type, copy_topic, (type param));
+extern MGD_FUNCTION(ret_type, move_topic, (type param));
+extern MGD_FUNCTION(ret_type, delete_topic_tree, (type param));
+extern MGD_FUNCTION(ret_type, walk_topic_tree, (type param));
 
 #endif
Index: php4/ext/midgard/midgard.c
diff -u php4/ext/midgard/midgard.c:1.19 php4/ext/midgard/midgard.c:1.20
--- php4/ext/midgard/midgard.c:1.19     Sun Feb 25 15:34:48 2001
+++ php4/ext/midgard/midgard.c  Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: midgard.c,v 1.19 2001/02/25 23:34:48 davidg Exp $
+/* $Id: midgard.c,v 1.20 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -63,13 +63,13 @@
 static int le_midgard;
 */
 
-MGD_FUNCTION(errno);
-MGD_FUNCTION(errstr);
-MGD_FUNCTION(version);
-MGD_FUNCTION(get_midgard);
-MGD_FUNCTION(auth_midgard);
+MGD_FUNCTION(ret_type, errno, (type param));
+MGD_FUNCTION(ret_type, errstr, (type param));
+MGD_FUNCTION(ret_type, version, (type param));
+MGD_FUNCTION(ret_type, get_midgard, (type param));
+MGD_FUNCTION(ret_type, auth_midgard, (type param));
 #if YOU_WANT_TO_TEST
-MGD_FUNCTION(walk_tree);
+MGD_FUNCTION(ret_type, walk_tree, (type param));
 #endif
 
 /* Every user visible function must have an entry in midgard_functions[].
@@ -485,14 +485,14 @@
    this convention for the convenience of others editing your code.
 */
 
-MGD_FUNCTION(errno)
+MGD_FUNCTION(ret_type, errno, (type param))
 {
    if (ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT;
 
     RETURN_LONG(mgd_get_errno());
 }
 
-MGD_FUNCTION(errstr)
+MGD_FUNCTION(ret_type, errstr, (type param))
 {
    zval **errcode;
    char *err;
@@ -516,7 +516,7 @@
    RETURN_STRING(err, 1);
 }
 
-MGD_FUNCTION(version)
+MGD_FUNCTION(ret_type, version, (type param))
 {
    RETURN_STRING((char*)mgd_version(), 1);
 }
@@ -581,7 +581,7 @@
        mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(get_midgard)
+MGD_FUNCTION(ret_type, get_midgard, (type param))
 {
        int i;
        zval *argv, *types;
@@ -645,7 +645,7 @@
                         &types, sizeof(types), NULL);
 }
 
-MGD_FUNCTION(auth_midgard)
+MGD_FUNCTION(ret_type, auth_midgard, (type param))
 {
        zval **username, **password, **send_cookie;
        char *cookie1;
@@ -776,7 +776,7 @@
 }
 
 #if YOU_WANT_TO_TEST
-MGD_FUNCTION(walk_tree)
+MGD_FUNCTION(ret_type, walk_tree, (type param))
 {
        zval **id, **level, **xparam, *xp[2], **order;
        zval **midgard_user_call_func_name, **sort = NULL;
Index: php4/ext/midgard/oop.c
diff -u php4/ext/midgard/oop.c:1.8 php4/ext/midgard/oop.c:1.9
--- php4/ext/midgard/oop.c:1.8  Sat Feb 24 13:12:11 2001
+++ php4/ext/midgard/oop.c      Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: oop.c,v 1.8 2001/02/24 21:12:11 davidg Exp $
+/* $Id: oop.c,v 1.9 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -369,7 +369,7 @@
                mgd_release(res);
 }
 
-MGD_FUNCTION(oop_guid_get)
+MGD_FUNCTION(ret_type, oop_guid_get, (type param))
 {
        zval *self;
        zval **zv_table, **zv_id;
@@ -415,7 +415,7 @@
        }
 }
 
-MGD_FUNCTION(oop_list_fetch)
+MGD_FUNCTION(ret_type, oop_list_fetch, (type param))
 {
        zval *self;
        zval **key;
@@ -626,7 +626,7 @@
    }
 }
 
-MGD_FUNCTION(get_object_by_guid)
+MGD_FUNCTION(ret_type, get_object_by_guid, (type param))
 {
    zval **guid;
    midgard_res *res;
Index: php4/ext/midgard/page.c
diff -u php4/ext/midgard/page.c:1.9 php4/ext/midgard/page.c:1.10
--- php4/ext/midgard/page.c:1.9 Sun Feb 25 11:31:17 2001
+++ php4/ext/midgard/page.c     Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: page.c,v 1.9 2001/02/25 19:31:17 davidg Exp $
+/* $Id: page.c,v 1.10 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_page_owner)
+MGD_FUNCTION(ret_type, is_page_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
     RETVAL_LONG(ispageowner(id));
 }
 
-MGD_FUNCTION(copy_page)
+MGD_FUNCTION(ret_type, copy_page, (type param))
 {
     zval **id, **root; int id_r;
 
@@ -58,7 +58,7 @@
        RETVAL_LONG(id_r);
 }
 
-MGD_FUNCTION(list_pages)
+MGD_FUNCTION(ret_type, list_pages, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -67,7 +67,7 @@
               "up=$d AND person.id=page.author", "name", id);
 }
 
-MGD_FUNCTION(is_in_page_tree)
+MGD_FUNCTION(ret_type, is_in_page_tree, (type param))
 {
     zval **root, **page;
 
@@ -94,7 +94,7 @@
                RETURN_TRUE;
 }
 
-MGD_FUNCTION(get_page)
+MGD_FUNCTION(ret_type, get_page, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -116,7 +116,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_PAGE, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_page_by_name)
+MGD_FUNCTION(ret_type, get_page_by_name, (type param))
 {
     zval **root, **page;
        CHECK_MGD;
@@ -131,7 +131,7 @@
            "page", "up", (*root)->value.lval, (*page)->value.str.val);
 }
 
-MGD_FUNCTION(create_page)
+MGD_FUNCTION(ret_type, create_page, (type param))
 {
        zval **up, **name, **style, **title, **content, **author, **auth, **active, 
*self;
 
@@ -208,7 +208,7 @@
        PHP_CREATE_REPLIGARD("page", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_page)
+MGD_FUNCTION(ret_type, update_page, (type param))
 {
        zval **id, **name, **style, **title, **content, **author, **auth, **active, 
*self;
 
@@ -281,7 +281,7 @@
        PHP_UPDATE_REPLIGARD("page", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_page)
+MGD_FUNCTION(ret_type, delete_page, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -304,14 +304,14 @@
     PHP_DELETE_REPLIGARD("page", id);
 }
 
-MGD_FUNCTION(page_has_children)
+MGD_FUNCTION(ret_type, page_has_children, (type param))
 {
     IDINIT;
        CHECK_MGD;
    RETVAL_FALSE;
     if (mgd_exists_id(mgd_handle(), "page", "up=$d", id)) { RETVAL_TRUE; }
 }
-MGD_FUNCTION(delete_page_tree)
+MGD_FUNCTION(ret_type, delete_page_tree, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/pageelement.c
diff -u php4/ext/midgard/pageelement.c:1.4 php4/ext/midgard/pageelement.c:1.5
--- php4/ext/midgard/pageelement.c:1.4  Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/pageelement.c      Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: pageelement.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: pageelement.c,v 1.5 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_page_elements)
+MGD_FUNCTION(ret_type, list_page_elements, (type param))
 {
     IDINIT;
        CHECK_MGD;
     php_midgard_select(&MidgardPageElement, return_value, "id,name", "pageelement", 
"page=$d", "name", id);
 }
 
-MGD_FUNCTION(get_page_element)
+MGD_FUNCTION(ret_type, get_page_element, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -50,7 +50,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_PAGEELEMENT, 
(*id)->value.lval);
 }
 
-MGD_FUNCTION(get_page_element_by_name)
+MGD_FUNCTION(ret_type, get_page_element_by_name, (type param))
 {
     zval **page, **name;
        CHECK_MGD;
@@ -63,7 +63,7 @@
            "pageelement", "page", (*page)->value.lval, (*name)->value.str.val);
 }
 
-MGD_FUNCTION(create_page_element)
+MGD_FUNCTION(ret_type, create_page_element, (type param))
 {
    zval **page, **name, **value, **inherit, *self;
 
@@ -120,7 +120,7 @@
        PHP_CREATE_REPLIGARD("pageelement", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_page_element)
+MGD_FUNCTION(ret_type, update_page_element, (type param))
 {
        zval **id, **name, **value, **inherit, *self;
 
@@ -161,7 +161,7 @@
        PHP_UPDATE_REPLIGARD("pageelement", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_page_element)
+MGD_FUNCTION(ret_type, delete_page_element, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -174,7 +174,7 @@
     PHP_DELETE_REPLIGARD("pageelement", id);
 }
 
-MGD_FUNCTION(copy_page_element)
+MGD_FUNCTION(ret_type, copy_page_element, (type param))
 {
     zval **id, **newpage;
        RETVAL_FALSE;
Index: php4/ext/midgard/pagelink.c
diff -u php4/ext/midgard/pagelink.c:1.4 php4/ext/midgard/pagelink.c:1.5
--- php4/ext/midgard/pagelink.c:1.4     Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/pagelink.c Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: pagelink.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: pagelink.c,v 1.5 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(has_pagelinks)
+MGD_FUNCTION(ret_type, has_pagelinks, (type param))
 {
 #if HAVE_MIDGARD_PAGELINKS
        RETURN_TRUE;
@@ -33,7 +33,7 @@
 #if HAVE_MIDGARD_PAGELINKS
 /* pagelink */
 
-MGD_FUNCTION(is_pagelink_owner)
+MGD_FUNCTION(ret_type, is_pagelink_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
@@ -41,7 +41,7 @@
 }
 
 
-MGD_FUNCTION(list_pagelinks)
+MGD_FUNCTION(ret_type, list_pagelinks, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -62,7 +62,7 @@
                "pagelink.name", id);
 }
 
-MGD_FUNCTION(list_pagelinks_targeted_at)
+MGD_FUNCTION(ret_type, list_pagelinks_targeted_at, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -83,7 +83,7 @@
                "pagelink.name", id);
 }
 
-MGD_FUNCTION(get_pagelink)
+MGD_FUNCTION(ret_type, get_pagelink, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -105,7 +105,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_PAGELINK, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_pagelink_by_name)
+MGD_FUNCTION(ret_type, get_pagelink_by_name, (type param))
 {
     zval **root, **pagelink;
        CHECK_MGD;
@@ -119,7 +119,7 @@
            "pagelink", "up", (*root)->value.lval, (*pagelink)->value.str.val);
 }
 
-MGD_FUNCTION(create_pagelink)
+MGD_FUNCTION(ret_type, create_pagelink, (type param))
 {
     zval **up, **name, **target, **grp, **owner, *self;
 
@@ -189,7 +189,7 @@
     PHP_CREATE_REPLIGARD("pagelink",return_value->value.lval);
 }
 
-MGD_FUNCTION(update_pagelink)
+MGD_FUNCTION(ret_type, update_pagelink, (type param))
 {
     zval **id, **name, **target, **grp, **owner, *self;
 
@@ -254,7 +254,7 @@
     PHP_UPDATE_REPLIGARD("pagelink",(*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_pagelink)
+MGD_FUNCTION(ret_type, delete_pagelink, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/parameter.c
diff -u php4/ext/midgard/parameter.c:1.3 php4/ext/midgard/parameter.c:1.4
--- php4/ext/midgard/parameter.c:1.3    Sat Feb 17 15:21:50 2001
+++ php4/ext/midgard/parameter.c        Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: parameter.c,v 1.3 2001/02/17 23:21:50 emile Exp $
+/* $Id: parameter.c,v 1.4 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -24,7 +24,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION (oop_parameter)
+MGD_FUNCTION(ret_type, oop_parameter, (type param))
 {
        zval *self;
        zval **zv_domain, **zv_name, **zv_value;
@@ -162,7 +162,7 @@
                mgd_release(res);
 }
 
-MGD_FUNCTION(oop_parameter_list)
+MGD_FUNCTION(ret_type, oop_parameter_list, (type param))
 {
        zval *self;
        zval **zv_domain;
@@ -222,7 +222,7 @@
                                   (*zv_id)->value.lval);
 }
 
-MGD_FUNCTION(oop_parameter_search)
+MGD_FUNCTION(ret_type, oop_parameter_search, (type param))
 {
        zval *self, **table;
        zval **where, **all;
Index: php4/ext/midgard/person.c
diff -u php4/ext/midgard/person.c:1.6 php4/ext/midgard/person.c:1.7
--- php4/ext/midgard/person.c:1.6       Sat Feb 24 05:39:30 2001
+++ php4/ext/midgard/person.c   Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: person.c,v 1.6 2001/02/24 13:39:30 davidg Exp $
+/* $Id: person.c,v 1.7 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -27,7 +27,7 @@
    "owner IN $D", mgd_groups(mgd_handle()));
 }
 
-MGD_FUNCTION(is_person_owner)
+MGD_FUNCTION(ret_type, is_person_owner, (type param))
 {
     IDINIT;
 
@@ -35,7 +35,7 @@
     RETVAL_LONG(isuserowner(id));
 }
 
-MGD_FUNCTION(is_member)
+MGD_FUNCTION(ret_type, is_member, (type param))
 {
 zval **zv_gid, **zv_uid;;
 
@@ -64,7 +64,7 @@
   }
 }
 
-MGD_FUNCTION(list_persons)
+MGD_FUNCTION(ret_type, list_persons, (type param))
 {
     php_midgard_select(&MidgardPerson, return_value, PERSON_SELECT,
                   "person", NULL, "lastname,firstname");
@@ -86,7 +86,7 @@
     return sort[i].sort;
 }
 
-MGD_FUNCTION(list_persons_in_department)
+MGD_FUNCTION(ret_type, list_persons_in_department, (type param))
 {
     const char *sortv = NULL;
     zval **id, **sortn;
@@ -115,13 +115,13 @@
                   "person", "department=$d", sortv, (*id)->value.lval);
 }
 
-MGD_FUNCTION(list_topic_persons)
+MGD_FUNCTION(ret_type, list_topic_persons, (type param))
 {
    php_if_mgd_list_persons_in_department(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 }
 
 
-MGD_FUNCTION(list_persons_in_department_all)
+MGD_FUNCTION(ret_type, list_persons_in_department_all, (type param))
 {
     int *deps;
     const char *sortv = NULL;
@@ -155,12 +155,12 @@
        }
 }
 
-MGD_FUNCTION(list_topic_persons_all)
+MGD_FUNCTION(ret_type, list_topic_persons_all, (type param))
 {
    php_if_mgd_list_persons_in_department_all(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 }
 
-MGD_FUNCTION(list_persons_in_office)
+MGD_FUNCTION(ret_type, list_persons_in_office, (type param))
 {
     const char *sortv = NULL;
     zval **id, **sortn;
@@ -188,7 +188,7 @@
                   "person", "office=$d", sortv, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_person)
+MGD_FUNCTION(ret_type, get_person, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -210,7 +210,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_PERSON, (*id)->value.lval);
 }
 
-MGD_FUNCTION(create_person)
+MGD_FUNCTION(ret_type, create_person, (type param))
 {
     zval **firstname, **lastname, **birthdate;
     zval **street, **postcode, **city, **handphone, **homephone, **workphone;
@@ -285,7 +285,7 @@
     PHP_CREATE_REPLIGARD("person",return_value->value.lval);
 }
 
-MGD_FUNCTION(update_person)
+MGD_FUNCTION(ret_type, update_person, (type param))
 {
     zval **id, **firstname, **lastname, **birthdate, **street, **postcode, **city;
     zval **handphone, **homephone, **workphone, **homepage, **email;
@@ -358,7 +358,7 @@
     PHP_UPDATE_REPLIGARD("person",(*id)->value.lval);
 }
 
-MGD_FUNCTION(update_password)
+MGD_FUNCTION(ret_type, update_password, (type param))
 {
     zval **uid, **username, **password;
 
@@ -394,7 +394,7 @@
     PHP_UPDATE_REPLIGARD("person",(*uid)->value.lval);
 }
 
-MGD_FUNCTION(update_password_plain)
+MGD_FUNCTION(ret_type, update_password_plain, (type param))
 {
     zval **uid, **username, **password;
 
@@ -431,7 +431,7 @@
     PHP_UPDATE_REPLIGARD("person",(*uid)->value.lval);
 }
 
-MGD_FUNCTION(update_public)
+MGD_FUNCTION(ret_type, update_public, (type param))
 {
     zval **uid, **addressp, **phonep, **homepagep, **emailp, **extrap;
 
@@ -460,7 +460,7 @@
     PHP_UPDATE_REPLIGARD("person",(*uid)->value.lval);
 }
 
-MGD_FUNCTION(delete_person)
+MGD_FUNCTION(ret_type, delete_person, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/preferences.c
diff -u php4/ext/midgard/preferences.c:1.4 php4/ext/midgard/preferences.c:1.5
--- php4/ext/midgard/preferences.c:1.4  Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/preferences.c      Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: preferences.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: preferences.c,v 1.5 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(list_preferences)
+MGD_FUNCTION(ret_type, list_preferences, (type param))
 {
        zval **uid, **dom;
        int user;
@@ -65,7 +65,7 @@
                                                   "preference", "uid=$d", 
"domain,name", user);
 }
 
-MGD_FUNCTION(get_preference)
+MGD_FUNCTION(ret_type, get_preference, (type param))
 {
        zval **pid, **dom, **name;
        int id;
@@ -117,7 +117,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_PREFERENCE, id);
 }
 
-MGD_FUNCTION(create_preference)
+MGD_FUNCTION(ret_type, create_preference, (type param))
 {
        zval **uid, **domain, **name, **value, *self;
        
@@ -160,7 +160,7 @@
        PHP_CREATE_REPLIGARD("preference",return_value->value.lval);
 }
 
-MGD_FUNCTION(update_preference)
+MGD_FUNCTION(ret_type, update_preference, (type param))
 {
        zval **id, **value, *self;
        
@@ -192,7 +192,7 @@
        PHP_UPDATE_REPLIGARD("preference", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_preference)
+MGD_FUNCTION(ret_type, delete_preference, (type param))
 {
        IDINIT;
        RETVAL_FALSE;
Index: php4/ext/midgard/preparser.c
diff -u php4/ext/midgard/preparser.c:1.6 php4/ext/midgard/preparser.c:1.7
--- php4/ext/midgard/preparser.c:1.6    Fri Feb 23 15:14:42 2001
+++ php4/ext/midgard/preparser.c        Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: preparser.c,v 1.6 2001/02/23 23:14:42 davidg Exp $
+/* $Id: preparser.c,v 1.7 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -129,7 +129,7 @@
        return value;
 }
 
-MGD_FUNCTION(template)
+MGD_FUNCTION(ret_type, template, (type param))
 {
        zval **arg;
        char *tmp;
@@ -209,7 +209,7 @@
        return php_midgard_include(pool, name, (*var)->value.str.val, type);
 }
 
-MGD_FUNCTION(variable)
+MGD_FUNCTION(ret_type, variable, (type param))
 {
        zval **var, **arg, **rec;
        char *tmp;
@@ -274,7 +274,7 @@
        mgd_free_pool(pool);
 }
 
-MGD_FUNCTION(snippet)
+MGD_FUNCTION(ret_type, snippet, (type param))
 {
        zval **file;
        char *part, *name;
@@ -416,7 +416,7 @@
        return retval;
 }
 
-MGD_FUNCTION(eval)
+MGD_FUNCTION(ret_type, eval, (type param))
 {
        zval **string, **name;
        char *tmp, *value;
@@ -458,7 +458,7 @@
        }
 }
 
-MGD_FUNCTION(register_filter)
+MGD_FUNCTION(ret_type, register_filter, (type param))
 {
        zval **name, **function;
        zval *func, **retval;
Index: php4/ext/midgard/sitegroup.c
diff -u php4/ext/midgard/sitegroup.c:1.5 php4/ext/midgard/sitegroup.c:1.6
--- php4/ext/midgard/sitegroup.c:1.5    Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/sitegroup.c        Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: sitegroup.c,v 1.5 2001/02/21 22:18:54 emile Exp $
+/* $Id: sitegroup.c,v 1.6 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(has_sitegroups)
+MGD_FUNCTION(ret_type, has_sitegroups, (type param))
 {
 #if HAVE_MIDGARD_SITEGROUPS
        RETURN_TRUE;
@@ -31,12 +31,12 @@
 }
 
 #if HAVE_MIDGARD_SITEGROUPS
-MGD_FUNCTION(list_sitegroups)
+MGD_FUNCTION(ret_type, list_sitegroups, (type param))
 {
   php_midgard_select(&MidgardSitegroup, return_value, "*", "sitegroup", NULL, "name");
 }
 
-MGD_FUNCTION(create_sitegroup)
+MGD_FUNCTION(ret_type, create_sitegroup, (type param))
 {
        zval **zv_name, *self;
 
@@ -79,7 +79,7 @@
        PHP_CREATE_REPLIGARD("sitegroup", return_value->value.lval);
 }
 
-MGD_FUNCTION(get_sitegroup)
+MGD_FUNCTION(ret_type, get_sitegroup, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -101,7 +101,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_SITEGROUP, (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_sitegroup)
+MGD_FUNCTION(ret_type, update_sitegroup, (type param))
 {
        zval **zv_id, **zv_name, **zv_admingroup, **zv_realm, *self;
        int group;
@@ -166,7 +166,7 @@
        PHP_UPDATE_REPLIGARD("sitegroup", id);
 }
 
-MGD_FUNCTION(delete_sitegroup)
+MGD_FUNCTION(ret_type, delete_sitegroup, (type param))
 {
   IDINIT;
   CHECK_MGD;
@@ -179,7 +179,7 @@
   PHP_DELETE_REPLIGARD("sitegroup", id);
 }
 
-MGD_FUNCTION(oop_sitegroup_get)
+MGD_FUNCTION(ret_type, oop_sitegroup_get, (type param))
 {
 zval *self = NULL;
 zval **pv_table, **pv_id;
@@ -215,7 +215,7 @@
       0, "*", "sitegroup", sitegroup);
 }
 
-MGD_FUNCTION(oop_sitegroup_set)
+MGD_FUNCTION(ret_type, oop_sitegroup_set, (type param))
 {
    zval *self;
    zval **zv_sitegroup;
Index: php4/ext/midgard/snippet.c
diff -u php4/ext/midgard/snippet.c:1.4 php4/ext/midgard/snippet.c:1.5
--- php4/ext/midgard/snippet.c:1.4      Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/snippet.c  Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: snippet.c,v 1.4 2001/02/21 22:18:54 emile Exp $
+/* $Id: snippet.c,v 1.5 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(snippet_exists)
+MGD_FUNCTION(ret_type, snippet_exists, (type param))
 {
        zval **file;
        int upval, idval;
@@ -43,14 +43,14 @@
        if(idval) RETURN_TRUE;
 }
 
-MGD_FUNCTION(list_snippets)
+MGD_FUNCTION(ret_type, list_snippets, (type param))
 {
     IDINIT;
        CHECK_MGD;
     php_midgard_select(&MidgardSnippet, return_value, 
"id,name,author,creator,created,revisor,revised,revision", "snippet", "up=$d", "name", 
id);
 }
 
-MGD_FUNCTION(get_snippet)
+MGD_FUNCTION(ret_type, get_snippet, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -74,7 +74,7 @@
     php_midgard_get_object(return_value, MIDGARD_OBJECT_SNIPPET, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_snippet_by_name)
+MGD_FUNCTION(ret_type, get_snippet_by_name, (type param))
 {
     zval **snippetdir, **name;
        CHECK_MGD;
@@ -90,7 +90,7 @@
                            (*snippetdir)->value.lval,(*name)->value.str.val);
 }
 
-MGD_FUNCTION(create_snippet)
+MGD_FUNCTION(ret_type, create_snippet, (type param))
 {
        zval **snippetdir, **name, **code, **doc, **author, *self;
 
@@ -154,7 +154,7 @@
        PHP_CREATE_REPLIGARD("snippet", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_snippet)
+MGD_FUNCTION(ret_type, update_snippet, (type param))
 {
        zval **id, **name, **code, **doc, **author, *self;
        int up;
@@ -248,7 +248,7 @@
        PHP_UPDATE_REPLIGARD("snippet", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_snippet)
+MGD_FUNCTION(ret_type, delete_snippet, (type param))
 {
        IDINIT;
        CHECK_MGD;
@@ -263,7 +263,7 @@
        PHP_DELETE_REPLIGARD("snippet", id);
 }
 
-MGD_FUNCTION(copy_snippet)
+MGD_FUNCTION(ret_type, copy_snippet, (type param))
 {
        zval **id, **newsnippetdir;
        RETVAL_FALSE;
Index: php4/ext/midgard/snippetdir.c
diff -u php4/ext/midgard/snippetdir.c:1.6 php4/ext/midgard/snippetdir.c:1.7
--- php4/ext/midgard/snippetdir.c:1.6   Mon Feb 26 01:45:04 2001
+++ php4/ext/midgard/snippetdir.c       Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: snippetdir.c,v 1.6 2001/02/26 09:45:04 davidg Exp $
+/* $Id: snippetdir.c,v 1.7 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_snippetdir_owner)
+MGD_FUNCTION(ret_type, is_snippetdir_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
     RETVAL_LONG(issnippetdirowner(id));
 }
 
-MGD_FUNCTION(list_snippetdirs)
+MGD_FUNCTION(ret_type, list_snippetdirs, (type param))
 {
     zval **id;
 
@@ -42,7 +42,7 @@
     php_midgard_select(&MidgardSnippetdir, return_value, "id,name", "snippetdir", 
"up=$d", "name", (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_snippetdir)
+MGD_FUNCTION(ret_type, get_snippetdir, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -64,7 +64,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_SNIPPETDIR, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_snippetdir_by_path)
+MGD_FUNCTION(ret_type, get_snippetdir_by_path, (type param))
 {
        zval **path;
        int id, up;
@@ -116,7 +116,7 @@
     return 0;
 }
 
-MGD_FUNCTION(create_snippetdir)
+MGD_FUNCTION(ret_type, create_snippetdir, (type param))
 {
        zval **up, **name, **description, **owner, *self;
        int id;
@@ -201,7 +201,7 @@
        }
 }
 
-MGD_FUNCTION(update_snippetdir)
+MGD_FUNCTION(ret_type, update_snippetdir, (type param))
 {
        zval **id, **name, **description, **owner, *self;
 
@@ -260,7 +260,7 @@
        PHP_UPDATE_REPLIGARD("snippetdir", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_snippetdir)
+MGD_FUNCTION(ret_type, delete_snippetdir, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -277,7 +277,7 @@
     PHP_DELETE_REPLIGARD("snippetdir", id);
 }
 
-MGD_FUNCTION(delete_snippetdir_tree)
+MGD_FUNCTION(ret_type, delete_snippetdir_tree, (type param))
 {
     IDINIT;
     CHECK_MGD;
@@ -286,7 +286,7 @@
     if(mgd_delete_snippetdir(mgd_handle(),  id)) { RETVAL_TRUE; }
 }
 
-MGD_FUNCTION(copy_snippetdir)
+MGD_FUNCTION(ret_type, copy_snippetdir, (type param))
 {
     zval **id, **path; int id_r, id_v;
 
Index: php4/ext/midgard/style.c
diff -u php4/ext/midgard/style.c:1.5 php4/ext/midgard/style.c:1.6
--- php4/ext/midgard/style.c:1.5        Wed Feb 21 14:18:54 2001
+++ php4/ext/midgard/style.c    Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: style.c,v 1.5 2001/02/21 22:18:54 emile Exp $
+/* $Id: style.c,v 1.6 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,14 +21,14 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_style_owner)
+MGD_FUNCTION(ret_type, is_style_owner, (type param))
 {
     IDINIT;
     CHECK_MGD;
     RETVAL_LONG(isstyleowner(id));
 }
 
-MGD_FUNCTION(list_styles)
+MGD_FUNCTION(ret_type, list_styles, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -49,7 +49,7 @@
                                                             (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_style)
+MGD_FUNCTION(ret_type, get_style, (type param))
 {
        zval **id;
        CHECK_MGD;
@@ -71,7 +71,7 @@
    php_midgard_get_object(return_value, MIDGARD_OBJECT_STYLE, (*id)->value.lval);
 }
 
-MGD_FUNCTION(get_style_by_name)
+MGD_FUNCTION(ret_type, get_style_by_name, (type param))
 {
     zval **style;
        CHECK_MGD;
@@ -83,7 +83,7 @@
                            (*style)->value.str.val);
 }
 
-MGD_FUNCTION(create_style)
+MGD_FUNCTION(ret_type, create_style, (type param))
 {
        zval **up, **name, **owner, *self;
 
@@ -135,7 +135,7 @@
        PHP_CREATE_REPLIGARD("style", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_style)
+MGD_FUNCTION(ret_type, update_style, (type param))
 {
        zval **id, **name, **owner, *self;
 
@@ -185,7 +185,7 @@
        PHP_UPDATE_REPLIGARD("style", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_style)
+MGD_FUNCTION(ret_type, delete_style, (type param))
 {
     IDINIT;
        CHECK_MGD;
@@ -205,14 +205,14 @@
     PHP_DELETE_REPLIGARD("style", id);
 }
 
-MGD_FUNCTION(copy_style)
+MGD_FUNCTION(ret_type, copy_style, (type param))
 {
     IDINIT;
        CHECK_MGD;
     RETVAL_LONG(mgd_copy_style(mgd_handle(),  id));
 }
 
-MGD_FUNCTION(delete_style_tree)
+MGD_FUNCTION(ret_type, delete_style_tree, (type param))
 {
     IDINIT;
        CHECK_MGD;
Index: php4/ext/midgard/topic.c
diff -u php4/ext/midgard/topic.c:1.9 php4/ext/midgard/topic.c:1.10
--- php4/ext/midgard/topic.c:1.9        Sun Feb 25 11:31:17 2001
+++ php4/ext/midgard/topic.c    Tue Feb 27 17:00:32 2001
@@ -1,4 +1,4 @@
-/* $Id: topic.c,v 1.9 2001/02/25 19:31:17 davidg Exp $
+/* $Id: topic.c,v 1.10 2001/02/28 01:00:32 davidg Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -21,7 +21,7 @@
 #include "mgd_internal.h"
 #include "mgd_oop.h"
 
-MGD_FUNCTION(is_topic_owner)
+MGD_FUNCTION(ret_type, is_topic_owner, (type param))
 {
        IDINIT;
        CHECK_MGD;
@@ -64,7 +64,7 @@
        return sort[i].sort;
 }
 
-MGD_FUNCTION(list_topics)
+MGD_FUNCTION(ret_type, list_topics, (type param))
 {
        const char *sortv = NULL;
        zval **id, **sortn;
@@ -100,7 +100,7 @@
                           "topic", "up=$d", sortv, (*id)->value.lval);
 }
 
-MGD_FUNCTION(is_in_topic_tree)
+MGD_FUNCTION(ret_type, is_in_topic_tree, (type param))
 {
        zval **root, **topic;
        int i;
@@ -132,7 +132,7 @@
                RETURN_TRUE;
 }
 
-MGD_FUNCTION(get_topic)
+MGD_FUNCTION(ret_type, get_topic, (type param))
 {
        zval **id, **name;
 
@@ -178,13 +178,13 @@
        }
 }
 
-MGD_FUNCTION(get_topic_by_name)
+MGD_FUNCTION(ret_type, get_topic_by_name, (type param))
 {
    /* EEH: just an alias */
    php_if_mgd_get_topic(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 }
 
-MGD_FUNCTION(create_topic)
+MGD_FUNCTION(ret_type, create_topic, (type param))
 {
        zval **up, **name, **description, **extra, **owner, **code;
        zval *self;
@@ -252,7 +252,7 @@
        PHP_CREATE_REPLIGARD("topic", return_value->value.lval);
 }
 
-MGD_FUNCTION(update_topic)
+MGD_FUNCTION(ret_type, update_topic, (type param))
 {
        zval **id, **name, **description, **extra, **owner, **code, *self;
 
@@ -312,7 +312,7 @@
        PHP_UPDATE_REPLIGARD("topic", (*id)->value.lval);
 }
 
-MGD_FUNCTION(update_topic_score)
+MGD_FUNCTION(ret_type, update_topic_score, (type param))
 {
        zval **id, **score, *self;
 
@@ -345,7 +345,7 @@
        PHP_UPDATE_REPLIGARD("topic", (*id)->value.lval);
 }
 
-MGD_FUNCTION(delete_topic)
+MGD_FUNCTION(ret_type, delete_topic, (type param))
 {
        IDINIT;
        CHECK_MGD;
@@ -360,7 +360,7 @@
        PHP_DELETE_REPLIGARD("topic", id);
 }
 
-MGD_FUNCTION(copy_topic)
+MGD_FUNCTION(ret_type, copy_topic, (type param))
 {
        zval **id, **root;
        int id_r;
@@ -411,7 +411,7 @@
        RETVAL_LONG(new_root);
 }
 
-MGD_FUNCTION(delete_topic_tree)
+MGD_FUNCTION(ret_type, delete_topic_tree, (type param))
 {
        IDINIT;
        CHECK_MGD;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to