Clean up function declaration

Change-Id: I92c54f61fe8608d788cc236956f4a5a58e20a7df
This commit is contained in:
Stephan Bergmann
2014-04-10 15:31:22 +02:00
parent 60cc9896c8
commit 691a54ccdf
3 changed files with 32 additions and 3 deletions

View File

@@ -20,6 +20,8 @@
#include <stdio.h>
#include <string.h>
#include <_getopt.h>
#define EPR fprintf(stderr,
#define ERR(str, chr) if(opterr) { EPR "%s%c\n", str, chr); }

29
soltools/cpp/_getopt.h Normal file
View File

@@ -0,0 +1,29 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SOLTOOLS_CPP_GETOPT_H
#define INCLUDED_SOLTOOLS_CPP_GETOPT_H
int stgetopt(int, char *const *, const char *);
extern char *optarg;
extern int optind;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -32,9 +32,7 @@
#include "cpp.h"
#if defined MACOSX || defined AIX || defined WNT
extern int stgetopt(int, char *const *, const char *);
extern char *optarg;
extern int optind;
#include <_getopt.h>
#else
#include <getopt.h>
#endif