~ubuntu-branches/ubuntu/trusty/cloog/trusty

« back to all changes in this revision

Viewing changes to isl/isl_ctx.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-13 04:29:53 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20130113042953-yffow2nvsub33dcd
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright 2008-2009 Katholieke Universiteit Leuven
3
3
 *
4
 
 * Use of this software is governed by the GNU LGPLv2.1 license
 
4
 * Use of this software is governed by the MIT license
5
5
 *
6
6
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7
7
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
9
9
 
10
10
#include <isl_ctx_private.h>
11
11
#include <isl/vec.h>
12
 
#include <isl/options.h>
 
12
#include <isl_options_private.h>
13
13
 
14
 
void isl_handle_error(isl_ctx *ctx, int errno, const char *msg,
 
14
void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
15
15
        const char *file, int line)
16
16
{
17
 
        isl_ctx_set_error(ctx, errno);
18
 
 
19
 
        switch (isl_options_get_on_error(ctx)) {
 
17
        if (!ctx)
 
18
                return;
 
19
 
 
20
        isl_ctx_set_error(ctx, error);
 
21
 
 
22
        switch (ctx->opt->on_error) {
20
23
        case ISL_ON_ERROR_WARN:
21
24
                fprintf(stderr, "%s:%d: %s\n", file, line, msg);
22
25
                return;
61
64
{
62
65
        if (!ctx)
63
66
                return NULL;
 
67
        if (args == &isl_options_args)
 
68
                return ctx->opt;
64
69
        return find_nested_options(ctx->user_args, ctx->user_opt, args);
65
70
}
66
71