~ubuntu-branches/debian/squeeze/warzone2100/squeeze

« back to all changes in this revision

Viewing changes to lib/framework/string_ext.h

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2010-08-05 21:08:56 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100805210856-qolydu7ht9w8u3rd
Tags: 2.3.3-1
* New upstream bugfix release
  - Fixes issues in 2.3.2 (Closes: #591215)
  - Upstream community renamed, update copyright information 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        This file is part of Warzone 2100.
3
 
        Copyright (C) 2005-2006  Free Software Foundation, Inc.
4
 
        Copyright (C) 2009 Warzone Resurrection Project
 
3
        Copyright (C) 1999-2004  Eidos Interactive
 
4
        Copyright (C) 2005-2010  Warzone 2100 Project
5
5
 
6
6
        Warzone 2100 is free software; you can redistribute it and/or modify
7
7
        it under the terms of the GNU General Public License as published by
15
15
 
16
16
        You should have received a copy of the GNU General Public License
17
17
        along with Warzone 2100; if not, write to the Free Software
18
 
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 
        MA 02110-1301, USA.
 
18
        Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
19
*/
21
20
#ifndef STRING_EXT_H
22
21
#define STRING_EXT_H
51
50
        (void)debug_MEMCHKOFF();
52
51
        result = (char*)malloc(strlen(s) + 1);
53
52
        (void)debug_MEMCHKON();
54
 
        debug(LOG_NEVER, "allocator toggled in %s %d",fileName,line);
 
53
 
55
54
        if (result == (char*)0)
56
55
                return (char*)0;
57
56
        strcpy(result, s);