pkgsrc/devel/cmdline/patches/patch-ar

59 lines
1.5 KiB
Text

$NetBSD: patch-ar,v 1.1.1.1 2000/08/25 16:15:53 jlam Exp $
--- src/cmd/syntax.h.orig Thu Jan 2 13:33:31 1997
+++ src/cmd/syntax.h
@@ -8,42 +8,46 @@
//
// ^HISTORY:
// 04/29/92 Brad Appleton <bradapp@enteract.com> Created
+//
+// 08/16/00 Johnny Lam <lamj@stat.cmu.edu>
+// - Updated to follow ISO C++ standard
//-^^---------------------------------------------------------------------
#ifndef _syntax_h
#define _syntax_h
+#include <iosfwd>
+
#include "fsm.h"
-class istream;
class ArgSyntax {
public:
- ArgSyntax(void)
+ ArgSyntax()
: arg_syntax(0), arg_char(0), arg_keyword(0), arg_value(0)
{}
// Return the syntax flags
- unsigned
- syntax(void) const { return arg_syntax; }
+ unsigned int
+ syntax() const { return arg_syntax; }
// Return the option character
char
- optchar(void) const { return arg_char; }
+ optchar() const { return arg_char; }
// Return the keyword name
const char *
- keyword(void) const { return arg_keyword; }
+ keyword() const { return arg_keyword; }
// Return the value name
const char *
- value(void) const { return arg_value; }
+ value() const { return arg_value; }
// Extract the syntax (compile it) from an input stream
friend istream &
operator>>(istream & is, ArgSyntax & arg);
private:
- unsigned arg_syntax ;
+ unsigned int arg_syntax ;
char arg_char;
const char * arg_keyword;
const char * arg_value;