Print this page
5396 gcc 4.8.2 longjmp errors for cscope-fast


   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.

  29  */
  30 
  31 #pragma ident   "%Z%%M% %I%     %E% SMI"
  32 
  33 /*
  34  *      cscope - interactive C symbol cross-reference
  35  *
  36  *      display functions
  37  */
  38 
  39 #include "global.h"
  40 #include "version.h"    /* FILEVERSION and FIXVERSION */
  41 #include <curses.h>       /* COLS and LINES */
  42 #include <setjmp.h>       /* jmp_buf */
  43 #include <string.h>
  44 #include <errno.h>
  45 
  46 /* see if the function column should be displayed */
  47 #define displayfcn()    (field <= ASSIGN)
  48 
  49 #define MINCOLS 68      /* minimum columns for 3 digit Lines message numbers */
  50 
  51 int     *displine;              /* screen line of displayed reference */
  52 int     disprefs;               /* displayed references */


 370 void
 371 atfield(void)
 372 {
 373         (void) move(fldline, (int)fldcolumn);
 374 }
 375 
 376 /* search for the symbol or text pattern */
 377 
 378 /*ARGSUSED*/
 379 SIGTYPE
 380 jumpback(int sig)
 381 {
 382         longjmp(env, 1);
 383 }
 384 
 385 BOOL
 386 search(void)
 387 {
 388         char    *egreperror = NULL;     /* egrep error message */
 389         FINDINIT rc = NOERROR;          /* findinit return code */
 390         SIGTYPE (*savesig)();           /* old value of signal */
 391         FP      f;                      /* searching function */
 392         char    *s;
 393         int     c;
 394 
 395         /* note: the pattern may have been a cscope argument */
 396         if (caseless == YES) {
 397                 for (s = pattern; *s != '\0'; ++s) {
 398                         *s = tolower(*s);
 399                 }
 400         }
 401         /* open the references found file for writing */
 402         if (writerefsfound() == NO) {
 403                 return (NO);
 404         }
 405         /* find the pattern - stop on an interrupt */
 406         if (linemode == NO) {
 407                 putmsg("Searching");
 408         }
 409         initprogress();
 410         if (setjmp(env) == 0) {




   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  * Copyright 2015 Gary Mills
  30  */
  31 


  32 /*
  33  *      cscope - interactive C symbol cross-reference
  34  *
  35  *      display functions
  36  */
  37 
  38 #include "global.h"
  39 #include "version.h"    /* FILEVERSION and FIXVERSION */
  40 #include <curses.h>       /* COLS and LINES */
  41 #include <setjmp.h>       /* jmp_buf */
  42 #include <string.h>
  43 #include <errno.h>
  44 
  45 /* see if the function column should be displayed */
  46 #define displayfcn()    (field <= ASSIGN)
  47 
  48 #define MINCOLS 68      /* minimum columns for 3 digit Lines message numbers */
  49 
  50 int     *displine;              /* screen line of displayed reference */
  51 int     disprefs;               /* displayed references */


 369 void
 370 atfield(void)
 371 {
 372         (void) move(fldline, (int)fldcolumn);
 373 }
 374 
 375 /* search for the symbol or text pattern */
 376 
 377 /*ARGSUSED*/
 378 SIGTYPE
 379 jumpback(int sig)
 380 {
 381         longjmp(env, 1);
 382 }
 383 
 384 BOOL
 385 search(void)
 386 {
 387         char    *egreperror = NULL;     /* egrep error message */
 388         FINDINIT rc = NOERROR;          /* findinit return code */
 389         SIGTYPE (*volatile savesig)() = SIG_DFL; /* old value of signal */
 390         FP      f;                      /* searching function */
 391         char    *s;
 392         int     c;
 393 
 394         /* note: the pattern may have been a cscope argument */
 395         if (caseless == YES) {
 396                 for (s = pattern; *s != '\0'; ++s) {
 397                         *s = tolower(*s);
 398                 }
 399         }
 400         /* open the references found file for writing */
 401         if (writerefsfound() == NO) {
 402                 return (NO);
 403         }
 404         /* find the pattern - stop on an interrupt */
 405         if (linemode == NO) {
 406                 putmsg("Searching");
 407         }
 408         initprogress();
 409         if (setjmp(env) == 0) {