~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/return.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: return.h,v 1.8 2000/05/29 14:07:28 andreas Exp $ -*- C++ -*-
2
 
// Macros for named return values (GNU C++ extension)
3
 
 
4
 
// Copyright (C) 1995 Technische Universitaet Braunschweig, Germany.
5
 
// Written by Andreas Zeller <zeller@gnu.org>.
6
 
// 
7
 
// This file is part of DDD.
8
 
// 
9
 
// DDD is free software; you can redistribute it and/or
10
 
// modify it under the terms of the GNU General Public
11
 
// License as published by the Free Software Foundation; either
12
 
// version 2 of the License, or (at your option) any later version.
13
 
// 
14
 
// DDD is distributed in the hope that it will be useful,
15
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
 
// See the GNU General Public License for more details.
18
 
// 
19
 
// You should have received a copy of the GNU General Public
20
 
// License along with DDD -- see the file COPYING.
21
 
// If not, write to the Free Software Foundation, Inc.,
22
 
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
 
// 
24
 
// DDD is the data display debugger.
25
 
// For details, see the DDD World-Wide-Web page, 
26
 
// `http://www.gnu.org/software/ddd/',
27
 
// or send a mail to the DDD developers <ddd@gnu.org>.
28
 
 
29
 
#ifndef _DDD_return_h
30
 
#define _DDD_return_h
31
 
 
32
 
#include "config.h"
33
 
 
34
 
// Use these macros for optional support of GNU C++ named return values
35
 
//
36
 
// Usage pattern:
37
 
//
38
 
// string f() RETURNS(x)
39
 
// {
40
 
//     RETURN_OBJECT(string, x);
41
 
//     x = <some value>;
42
 
//     RETURN(x);
43
 
// }
44
 
 
45
 
#if HAVE_NAMED_RETURN_VALUES
46
 
 
47
 
#define RETURN(r) return
48
 
#define RETURNS(r) return r;
49
 
#define RETURN_OBJECT(TYPE, NAME) /* nothing */
50
 
 
51
 
#else
52
 
 
53
 
#define RETURN(r) return r
54
 
#define RETURNS(r) /* nothing */
55
 
#define RETURN_OBJECT(TYPE, NAME) TYPE NAME;
56
 
 
57
 
#endif
58
 
 
59
 
#endif // _DDD_return_h
60
 
// DON'T ADD ANYTHING BEHIND THIS #endif