home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume36
/
formes
/
part01
/
subject.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-01
|
1KB
|
67 lines
/*
* Copyright (C) 1992-1993 Jeffrey Chilton
*
* Permission is granted to anyone to make or distribute copies of
* this program, in any medium, provided that the copyright notice
* and permission notice are preserved, and that the distributor
* grants the recipient permission for further redistribution as
* permitted by this notice.
*
* Author's E-mail address: 172-9221@mcimail.com
*
*/
static char *whatstring = "@(#)subject.c 2.3 JWC";
#include <stdio.h>
#include <malloc.h>
#include "class.h"
#include "subject.h"
#include "form.h"
Subject *
Subject_new(text, form)
char *text;
Form *form;
{
Subject *self;
self = (Subject *)malloc(sizeof (Subject));
if (!self)
{
fprintf(stderr, "Subject_new: malloc fails\n");
goto out;
}
self->text = ExtendString_newFromString(text);
self->form = form;
out:
return self;
}
void
Subject_destroy(self)
Subject *self;
{
ExtendString_destroy(self->text);
free(self);
}
#ifndef PRODUCTION
void
Subject_printOn(self, stream)
Subject *self;
FILE *stream;
{
fprintf(stream, "SUBJECT: %s %s\n", Form_image(self->form), self->text);
}
#endif