From owner-p4-projects@FreeBSD.ORG Sun Jun 17 03:18:21 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5926416A46B; Sun, 17 Jun 2007 03:18:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 118C816A468 for ; Sun, 17 Jun 2007 03:18:21 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 012D613C43E for ; Sun, 17 Jun 2007 03:18:21 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5H3IKW7034980 for ; Sun, 17 Jun 2007 03:18:20 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5H3IK2V034965 for perforce@freebsd.org; Sun, 17 Jun 2007 03:18:20 GMT (envelope-from andrew@freebsd.org) Date: Sun, 17 Jun 2007 03:18:20 GMT Message-Id: <200706170318.l5H3IK2V034965@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 121817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 03:18:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=121817 Change 121817 by andrew@andrew_hermies on 2007/06/17 03:17:56 Add object handeling functions that will be used with elements Affected files ... .. //depot/projects/soc2007/andrew-update/lib/Makefile#2 edit .. //depot/projects/soc2007/andrew-update/lib/facund_object.c#1 add .. //depot/projects/soc2007/andrew-update/lib/facund_object.h#1 add .. //depot/projects/soc2007/andrew-update/lib/facund_private.h#3 edit Differences ... ==== //depot/projects/soc2007/andrew-update/lib/Makefile#2 (text+ko) ==== @@ -1,6 +1,6 @@ LIB=facund -SRCS=facund_connection.c facund_server.c +SRCS=facund_connection.c facund_object.c facund_server.c WARNS=6 ==== //depot/projects/soc2007/andrew-update/lib/facund_private.h#3 (text+ko) ==== @@ -28,11 +28,30 @@ #ifndef FACUND_PRIVATE_H #define FACUND_PRIVATE_H +#include "facund_object.h" + #include #include #include +struct facund_object { + enum facund_type obj_type; + int obj_assigned; + enum facund_object_error obj_error; + + /* Used when this is part of an array */ + struct facund_object *obj_parent; + + int32_t obj_int; /* Used in bool, int and uint types */ + char *obj_string; /* Used in string type */ + struct facund_object **obj_array;/* Used in array type */ + size_t obj_array_count; + + /* Used for indenting arrays */ + unsigned int obj_depth; +}; + struct facund_conn { int do_unlink; /* If true unlink the socket on close */ struct sockaddr_un local; /* The local connection */ @@ -42,6 +61,9 @@ int fd; /* The fd to the remote device */ XML_Parser parser; + char current_call[32]; + char call_id[8]; + struct facund_object *call_arg; }; #endif /* FACUND_PRIVATE_H */