Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
fmtparse.c File Reference
#include "lio.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <cray/format.h>
#include <cray/nassert.h>
#include <cray/portdefs.h>
Include dependency graph for fmtparse.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  parse_block

Defines

#define GET(P)
#define GETNUM(P, M)
#define E_WITH_D_NON_ANSI   DW_IS_NON_ANSI

Functions

static void fmterr (parse_block *pfmt, short msg_num, short code, long column)
static short process_paren_group (parse_block *pfmt, fmt_type *ploc)
fmt_type_fmt_parse (_Error_function **msg_rtn, char *format_str, long routine_caller, long *fmt_str_len, msg_type *lib_err_msg)
static void recover (parse_block *pfmt)
static short nonzero_integer (parse_block *pfmt, long *size)
static void process_arl (parse_block *pfmt, unsigned short op_code)
static void process_defg (parse_block *pfmt, unsigned short op_code)
static void process_bioz (parse_block *pfmt, unsigned short op_code)
static void process_t (parse_block *pfmt)
static void process_p (parse_block *pfmt, long scale_factor)
static void process_char_string (parse_block *pfmt)
static short process_minus (parse_block *pfmt)

Variables

static int64 non_repeatable [2]

Define Documentation

Definition at line 113 of file fmtparse.c.

Referenced by process_defg().

#define GET (   P)
Value:
{                                               \
        do {                                                    \
                if (++P->fmt_pos > P->fmt_len) {                \
                        P->fmt_ch       = '\0';                 \
                        P->fmt_pos--;                           \
                        break;                                  \
                }                                               \
                P->fmt_ch       = *(++P->fmt_ptr);              \
        } while (P->fmt_ch == ' ' || P->fmt_ch == '\t');        \
}

Definition at line 92 of file fmtparse.c.

Referenced by _fmt_parse(), process_arl(), process_bioz(), process_char_string(), process_defg(), process_minus(), process_p(), process_paren_group(), process_t(), and recover().

#define GETNUM (   P,
  M 
)
Value:
{                                               \
        do {                                                    \
                M       = (M + M + (M << 3)) + ((int64) P->fmt_ch - ZERO);\
                GET(P);                                         \
        } while (IS_DIGIT(P->fmt_ch));                          \
}

Definition at line 103 of file fmtparse.c.

Referenced by nonzero_integer(), process_arl(), process_bioz(), process_defg(), process_minus(), and process_paren_group().


Function Documentation

static short nonzero_integer ( parse_block pfmt,
long *  size 
) [static]

Definition at line 437 of file fmtparse.c.

References EXPECTING_INTEGER, FALL, FALSE, FIELD_TOO_LARGE, FIELD_WIDTH_ZERO, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GETNUM, IS_DIGIT, MAX_FIELD_WIDTH, size, and TRUE.

Referenced by process_t().

Here is the call graph for this function:

static void process_arl ( parse_block pfmt,
unsigned short  op_code 
) [static]
static void process_p ( parse_block pfmt,
long  scale_factor 
) [static]

Definition at line 912 of file fmtparse.c.

References ANSI_COMMA_REQ, FALL, parse_block::fmt_ch, parse_block::fmt_pos, fmterr(), GET, fmt_entry::offset, fmt_entry::op_code, P_ED, parse_block::pptr, and fmt_entry::rep_count.

Referenced by process_minus(), and process_paren_group().

Here is the call graph for this function:

static void process_t ( parse_block pfmt) [static]

Definition at line 844 of file fmtparse.c.

References fmt_entry::field_width, parse_block::fmt_ch, GET, nonzero_integer(), fmt_entry::op_code, parse_block::pptr, fmt_entry::rep_count, size, T_ED, TL_ED, and TR_ED.

Referenced by process_paren_group().

Here is the call graph for this function:

static void recover ( parse_block pfmt) [static]

Variable Documentation

int64 non_repeatable[2] [static]
Initial value:
 {
        0x00000000297EFFE0,     
        0x0000180800001800      
}

Definition at line 80 of file fmtparse.c.

Referenced by process_paren_group().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines