~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/gc/dbg_mlc.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-06-21 09:21:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621092121-txz1f21lj0wh0f67
Tags: 0.9h-20060617-1
* New upstream version
* Updated standards version without real changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * modified is included with the above copyright notice.
15
15
 */
16
16
 
 
17
#include <errno.h>
 
18
#include <string.h>
17
19
#include "private/dbg_mlc.h"
18
20
 
19
21
void GC_default_print_heap_obj_proc();
714
716
}
715
717
 
716
718
# ifdef __STDC__
 
719
    char *GC_debug_strdup(const char *str, GC_EXTRA_PARAMS)
 
720
#else
 
721
    char *GC_debug_strdup(str, s, i)
 
722
    char *str;
 
723
    char *s;
 
724
    int i;
 
725
#endif
 
726
{
 
727
    char *copy;
 
728
    if (str == NULL) return NULL;
 
729
    copy = GC_debug_malloc_atomic(strlen(str) + 1, OPT_RA s, i);
 
730
    if (copy == NULL) {
 
731
      errno = ENOMEM;
 
732
      return NULL;
 
733
    }
 
734
    strcpy(copy, str);
 
735
    return copy;
 
736
}
 
737
 
 
738
# ifdef __STDC__
717
739
    GC_PTR GC_debug_malloc_uncollectable(size_t lb, GC_EXTRA_PARAMS)
718
740
# else
719
741
    GC_PTR GC_debug_malloc_uncollectable(lb, s, i)