Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
45
cde/examples/dtcalendar/Makefile.hp
Normal file
45
cde/examples/dtcalendar/Makefile.hp
Normal file
@@ -0,0 +1,45 @@
|
||||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:43:48 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for dtcalendar examples (HP)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = attributes
|
||||
SOURCES = attributes.c
|
||||
OBJECTS = attributes.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE =
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lcsa
|
||||
X11LIBS =
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
${CC} -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
${RM} $(PROGRAM) $(OBJECTS)
|
||||
45
cde/examples/dtcalendar/Makefile.ibm
Normal file
45
cde/examples/dtcalendar/Makefile.ibm
Normal file
@@ -0,0 +1,45 @@
|
||||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:44:05 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for dtcalendar examples (IBM)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = attributes
|
||||
SOURCES = attributes.c
|
||||
OBJECTS = attributes.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE =
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lcsa -lXm
|
||||
X11LIBS = -L/usr/lib -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
||||
45
cde/examples/dtcalendar/Makefile.novell
Normal file
45
cde/examples/dtcalendar/Makefile.novell
Normal file
@@ -0,0 +1,45 @@
|
||||
# $XConsortium: Makefile.novell /main/2 1996/05/13 11:44:23 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for dtcalendar examples (Novell)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = attributes
|
||||
SOURCES = attributes.c
|
||||
OBJECTS = attributes.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE =
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lcsa
|
||||
X11LIBS =
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
||||
45
cde/examples/dtcalendar/Makefile.sun
Normal file
45
cde/examples/dtcalendar/Makefile.sun
Normal file
@@ -0,0 +1,45 @@
|
||||
# $XConsortium: Makefile.sun /main/2 1996/05/13 11:44:41 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for dtcalendar examples (SUN)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = attributes
|
||||
SOURCES = attributes.c
|
||||
OBJECTS = attributes.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE =
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lcsa
|
||||
X11LIBS =
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
||||
46
cde/examples/dtcalendar/Makefile.uxp
Normal file
46
cde/examples/dtcalendar/Makefile.uxp
Normal file
@@ -0,0 +1,46 @@
|
||||
# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:44:58 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for dtcalendar examples (UXP)
|
||||
#
|
||||
# (Fujitsu.patch applied)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = attributes
|
||||
SOURCES = attributes.c
|
||||
OBJECTS = attributes.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lcsa
|
||||
X11LIBS = -lXt -lX11
|
||||
SYSLIBS = -lnsl
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
||||
15
cde/examples/dtcalendar/README
Normal file
15
cde/examples/dtcalendar/README
Normal file
@@ -0,0 +1,15 @@
|
||||
/* $XConsortium: README /main/2 1996/07/15 13:59:40 drk $ */
|
||||
|
||||
This directory contains demonstrations of the csa calendar API
|
||||
|
||||
attributes - Examples of using the csa API to inquire about the
|
||||
attributes of a remote calendar.
|
||||
|
||||
The usage for attributes is:
|
||||
|
||||
Usage: attributes user@host
|
||||
|
||||
example:
|
||||
|
||||
attributes al@sanani
|
||||
|
||||
61
cde/examples/dtcalendar/attributes.c
Normal file
61
cde/examples/dtcalendar/attributes.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/* $XConsortium: attributes.c /main/3 1995/10/27 10:37:52 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
/*
|
||||
* attributes.c - retrieve calendar attributes
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <csa/csa.h>
|
||||
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
CSA_session_handle cal;
|
||||
CSA_calendar_user user;
|
||||
CSA_uint32 num_names;
|
||||
CSA_attribute_reference *names;
|
||||
CSA_return_code stat;
|
||||
int i;
|
||||
|
||||
if (argc < 2) {
|
||||
printf("usage: %s user@host\n", argv[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
memset((void *)&user, NULL, sizeof(CSA_calendar_user));
|
||||
user.calendar_address = argv[1];
|
||||
|
||||
if ((stat = csa_logon(NULL, &user, NULL, NULL, NULL, &cal, NULL))
|
||||
!= CSA_SUCCESS)
|
||||
{
|
||||
printf("Logon to %s failed, stat = %d\n", argv[1],
|
||||
stat);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((stat = csa_list_calendar_attributes(cal, &num_names, &names,
|
||||
NULL)) == CSA_SUCCESS) {
|
||||
|
||||
printf("List calendar attributes:\n");
|
||||
for (i = 0; i < num_names; i++)
|
||||
printf("%s\n", names[i]);
|
||||
|
||||
csa_free(names);
|
||||
} else
|
||||
printf("csa_list_calendar_attributes failed, stat = %d\n",
|
||||
stat);
|
||||
|
||||
(void)csa_logoff(cal, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user