pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.482 2003/10/20 13:14:28 mast Exp $ + || $Id: program.c,v 1.483 2003/10/21 02:16:34 nilsson Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.482 2003/10/20 13:14:28 mast Exp $"); + RCSID("$Id: program.c,v 1.483 2003/10/21 02:16:34 nilsson Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:4974:   {    struct pike_string *res = low_get_program_line(prog, linep);    if (!res) {    struct pike_string *dash;    MAKE_CONSTANT_SHARED_STRING(dash, "-");    return dash;    }    return res;   }    - #ifdef PIKE_DEBUG +    /* Same as get_line but only used for debugging, returns a char* which    * might be to a static buffer. This is important because this    * function may be called in places where we can't handle shared    * strings. If pc is NULL the program line is returned.    */   char *debug_get_line(PIKE_OPCODE_T *pc, struct program *prog, INT32 *linep)   {    size_t len = 0;    INT32 shift = 0;    char *file = NULL;
pike.git/src/program.c:5067: Inside #if defined(PIKE_DEBUG)
   }   }      /* Variant for convenient use from a debugger. */   void gdb_line (PIKE_OPCODE_T *pc, struct program *prog)   {    INT32 line;    char *file = debug_get_line (pc, prog, &line);    fprintf (stderr, "%s:%d\n", file, line);   } - #endif +       PMOD_EXPORT struct pike_string *low_get_line (PIKE_OPCODE_T *pc,    struct program *prog, INT32 *linep)   {    linep[0] = 0;       if (prog->program && prog->linenumbers) {    ptrdiff_t offset = pc - prog->program;    if ((offset < (ptrdiff_t)prog->num_program) && (offset >= 0)) {    static char *file = NULL;