/*
  docgen  Objective C Document Generator
  Copyright (C) 1995  Bill Bereza.
  
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  
  Email:
  berezaw@river.it.gvsu.edu

  S-mail:
  Bill Bereza
  9526 Judson Rd.
  Ravenna, MI 49451-9427

  */
/* docgen	Objective C Document Generator
 * Copyright (c) 1994 Bill Bereza
 *
 * $Log:	DocgenFormatter.m,v $
 * Revision 1.4  95/07/26  21:46:33  berezaw
 * *** empty log message ***
 * 
 * Revision 1.3  95/07/21  21:40:29  berezaw
 * *** empty log message ***
 * 
 * Revision 1.2  95/07/21  15:23:06  berezaw
 * *** empty log message ***
 * 
 * Revision 1.1  95/07/21  01:59:17  berezaw
 * Initial revision
 * 
 *
 *	$Id: DocgenFormatter.m,v 1.4 95/07/26 21:46:33 berezaw Exp $
 */

#include <stdio.h>
#include <stdarg.h>

#include "DocgenFormatter.h"

@implementation DocgenFormatter
/*
   This class just implements some of the *(FILE* **)* stuff. You could subclass this class if you want to save a little work.
   */

// <Formatting> methods

+(char *)fileExtension
{
	static char ext[]="";

	return ext;
}

-(int)writeFormat:(const char *)format, ...
{
	int ret;
	va_list ap;
	
	va_start(ap, format);
	ret = vfprintf(of, format, ap);
	va_end(ap);
	return ret;
}

// Generic formatting commands
-(int)changeFontSize:(int)to { [self subclassResponsibility:_cmd]; return -1; }
-(int)putLine:(const char *)line { [self subclassResponsibility:_cmd]; return -1; }
-(int)putEof { [self subclassResponsibility:_cmd]; return -1; }
-(int)makeBold { [self subclassResponsibility:_cmd]; return -1; }
-(int)unBold { [self subclassResponsibility:_cmd]; return -1; }
-(int)makeItalic { [self subclassResponsibility:_cmd]; return -1; }
-(int)unItalic { [self subclassResponsibility:_cmd]; return -1; }
-(int)changeFont:(int)to { [self subclassResponsibility:_cmd]; return -1; }
-(int)makeUnderline { [self subclassResponsibility:_cmd]; return -1; }
-(int)unUnderline { [self subclassResponsibility:_cmd]; return -1; }

// <DocgenFormatting> stuff

-init
/*
   init calls initWithOfile: with stdio as the argument

   See Also: initWithOfile:
   */
{
	return [self initWithOfile:stdout];
}

-initWithOfile:(FILE *)fp
/*
   *Designated* *Initializor.*
   */
{
	[super init];

	[self setOfile:fp];

	return self;
}

-setOfile:(FILE *)fp
{
	of=fp;
	return self;
}

-(FILE *)Ofile { return of; }

-(int)putConformHeader:(const char *)line { [self subclassResponsibility:_cmd]; return -1; }
-(int)putMethodL1 { [self subclassResponsibility:_cmd]; return -1; }
-(int)putMethodL2 { [self subclassResponsibility:_cmd]; return -1; }
-(int)putHead { [self subclassResponsibility:_cmd]; return -1; }
-(int)putCPHead { [self subclassResponsibility:_cmd]; return -1; }
-(int)putMethodDescription { [self subclassResponsibility:_cmd]; return -1; }
-(int)putFont:(int)fn Char:(int)theChar { [self subclassResponsibility:_cmd]; return -1; }
-(int)putStart { [self subclassResponsibility:_cmd]; return -1; }
-(int)putInheritHeader { [self subclassResponsibility:_cmd]; return -1; }
-(int)putInheritTail:(const char *)line { [self subclassResponsibility:_cmd]; return -1; }
-(int)putCategoryHeader { [self subclassResponsibility:_cmd]; return -1; }
-(int)putCategoryTail:(const char *)line { [self subclassResponsibility:_cmd]; return -1; }
-(int)putIHeader { [self subclassResponsibility:_cmd]; return -1; }
-(int)putMethodHeader:(const char *)kindof { [self subclassResponsibility:_cmd]; return -1; }
-(int)putMethodType { [self subclassResponsibility:_cmd]; return -1; }
-(int)putIVarDescription { [self subclassResponsibility:_cmd]; return -1; }

@end
