[Zope-CVS] CVS: Packages/Spread - spreadmodule.c:1.9

Guido van Rossum guido@python.org
Wed, 19 Dec 2001 23:38:04 -0500


Update of /cvs-repository/Packages/Spread
In directory cvs.zope.org:/tmp/cvs-serv12821

Modified Files:
	spreadmodule.c 
Log Message:
Reformatted.


=== Packages/Spread/spreadmodule.c 1.8 => 1.9 === (1361/1461 lines abridged)
 
 typedef struct {
-    PyObject_HEAD
-    mailbox mbox;
-    PyObject *private_group;
-    int max_groups;
-    int msg_size;
-    int disconnected;
+	PyObject_HEAD
+	mailbox mbox;
+	PyObject *private_group;
+	int max_groups;
+	int msg_size;
+	int disconnected;
 } MailboxObject;
 
 typedef struct {
-    PyObject_HEAD
-    PyObject *sender;
-    PyObject *groups;
-    short msg_type; /* sp.h: #define int16 short*/
-    int endian;
-    PyObject *message;
-    int truncated;
+	PyObject_HEAD
+	PyObject *sender;
+	PyObject *groups;
+	short msg_type; /* sp.h: #define int16 short*/
+	int endian;
+	PyObject *message;
+	int truncated;
 } RegularMsg;
 
 typedef struct {
-    group_id gid;
-    int num_members;
-    char members[1][MAX_GROUP_NAME];
+	group_id gid;
+	int num_members;
+	char members[1][MAX_GROUP_NAME];
 } extra_member_info;
 
 typedef struct {
-    PyObject_HEAD
-    int reason;
-    PyObject *group;
-    PyObject *group_id;
-    PyObject *members;
-    PyObject *extra; /* that are still members */
+	PyObject_HEAD

[-=- -=- -=- 1361 lines omitted -=- -=- -=-]

-    PyModule_AddIntConstant(m, "BUFFER_TOO_SHORT", BUFFER_TOO_SHORT);
-    PyModule_AddIntConstant(m, "GROUPS_TOO_SHORT", GROUPS_TOO_SHORT);
-    PyModule_AddIntConstant(m, "MESSAGE_TOO_LONG", MESSAGE_TOO_LONG);
+	/* programmatically generated from sp.h */
+	PyModule_AddIntConstant(m, "LOW_PRIORITY", LOW_PRIORITY);
+	PyModule_AddIntConstant(m, "MEDIUM_PRIORITY", MEDIUM_PRIORITY);
+	PyModule_AddIntConstant(m, "HIGH_PRIORITY", HIGH_PRIORITY);
+	PyModule_AddIntConstant(m, "DEFAULT_SPREAD_PORT", DEFAULT_SPREAD_PORT);
+	PyModule_AddIntConstant(m, "SPREAD_VERSION", SPREAD_VERSION);
+	PyModule_AddIntConstant(m, "MAX_GROUP_NAME", MAX_GROUP_NAME);
+	PyModule_AddIntConstant(m, "MAX_PRIVATE_NAME", MAX_PRIVATE_NAME);
+	PyModule_AddIntConstant(m, "MAX_PROC_NAME", MAX_PROC_NAME);
+	PyModule_AddIntConstant(m, "UNRELIABLE_MESS", UNRELIABLE_MESS);
+	PyModule_AddIntConstant(m, "RELIABLE_MESS", RELIABLE_MESS);
+	PyModule_AddIntConstant(m, "FIFO_MESS", FIFO_MESS);
+	PyModule_AddIntConstant(m, "CAUSAL_MESS", CAUSAL_MESS);
+	PyModule_AddIntConstant(m, "AGREED_MESS", AGREED_MESS);
+	PyModule_AddIntConstant(m, "SAFE_MESS", SAFE_MESS);
+	PyModule_AddIntConstant(m, "REGULAR_MESS", REGULAR_MESS);
+	PyModule_AddIntConstant(m, "SELF_DISCARD", SELF_DISCARD);
+	PyModule_AddIntConstant(m, "DROP_RECV", DROP_RECV);
+	PyModule_AddIntConstant(m, "REG_MEMB_MESS", REG_MEMB_MESS);
+	PyModule_AddIntConstant(m, "TRANSITION_MESS", TRANSITION_MESS);
+	PyModule_AddIntConstant(m, "CAUSED_BY_JOIN", CAUSED_BY_JOIN);
+	PyModule_AddIntConstant(m, "CAUSED_BY_LEAVE", CAUSED_BY_LEAVE);
+	PyModule_AddIntConstant(m, "CAUSED_BY_DISCONNECT",
+				CAUSED_BY_DISCONNECT); 
+	PyModule_AddIntConstant(m, "CAUSED_BY_NETWORK", CAUSED_BY_NETWORK);
+	PyModule_AddIntConstant(m, "MEMBERSHIP_MESS", MEMBERSHIP_MESS);
+	PyModule_AddIntConstant(m, "ENDIAN_RESERVED", ENDIAN_RESERVED);
+	PyModule_AddIntConstant(m, "RESERVED", RESERVED);
+	PyModule_AddIntConstant(m, "REJECT_MESS", REJECT_MESS);
+	PyModule_AddIntConstant(m, "ACCEPT_SESSION", ACCEPT_SESSION);
+	PyModule_AddIntConstant(m, "ILLEGAL_SPREAD", ILLEGAL_SPREAD);
+	PyModule_AddIntConstant(m, "COULD_NOT_CONNECT", COULD_NOT_CONNECT);
+	PyModule_AddIntConstant(m, "REJECT_QUOTA", REJECT_QUOTA);
+	PyModule_AddIntConstant(m, "REJECT_NO_NAME", REJECT_NO_NAME);
+	PyModule_AddIntConstant(m, "REJECT_ILLEGAL_NAME", REJECT_ILLEGAL_NAME);
+	PyModule_AddIntConstant(m, "REJECT_NOT_UNIQUE", REJECT_NOT_UNIQUE);
+	PyModule_AddIntConstant(m, "REJECT_VERSION", REJECT_VERSION);
+	PyModule_AddIntConstant(m, "CONNECTION_CLOSED", CONNECTION_CLOSED);
+	PyModule_AddIntConstant(m, "REJECT_AUTH", REJECT_AUTH);
+	PyModule_AddIntConstant(m, "ILLEGAL_SESSION", ILLEGAL_SESSION);
+	PyModule_AddIntConstant(m, "ILLEGAL_SERVICE", ILLEGAL_SERVICE);
+	PyModule_AddIntConstant(m, "ILLEGAL_MESSAGE", ILLEGAL_MESSAGE);
+	PyModule_AddIntConstant(m, "ILLEGAL_GROUP", ILLEGAL_GROUP);
+	PyModule_AddIntConstant(m, "BUFFER_TOO_SHORT", BUFFER_TOO_SHORT);
+	PyModule_AddIntConstant(m, "GROUPS_TOO_SHORT", GROUPS_TOO_SHORT);
+	PyModule_AddIntConstant(m, "MESSAGE_TOO_LONG", MESSAGE_TOO_LONG);
 }