Ticket #44634: alpine-2.00_panic_rename.patch

File alpine-2.00_panic_rename.patch, 20.8 KB (added by greeneg (Gary Greene), 10 years ago)

Rename all uses of panic to uw_panic to work around mach headers scoping issues.

  • alpine/adrbkcmd.c

    diff -urN alpine-2.00-patched/alpine/adrbkcmd.c alpine-2.00/alpine/adrbkcmd.c
    old new  
    527527        break;
    528528
    529529      default:
    530         panic("Unexpected command in process_abook_view_cmd");
     530        uw_panic("Unexpected command in process_abook_view_cmd");
    531531        break;
    532532    }
    533533
     
    26342634    }
    26352635
    26362636    if(!ps->prc)
    2637       panic("NULL prc in convert_to_remote_config");
     2637      uw_panic("NULL prc in convert_to_remote_config");
    26382638
    26392639    dprint((2, "convert_to_remote_config\n"));
    26402640   
     
    50115011            break;
    50125012         
    50135013          default:
    5014             panic("can't happen in write_single_vcard_entry");
     5014            uw_panic("can't happen in write_single_vcard_entry");
    50155015        }
    50165016
    50175017        for(; ll && *ll; ll++){
     
    51445144            break;
    51455145
    51465146          default:
    5147             panic("can't happen in write_single_tab_entry");
     5147            uw_panic("can't happen in write_single_tab_entry");
    51485148        }
    51495149
    51505150        if(i)
     
    73667366        break;
    73677367
    73687368      default:
    7369         panic("Unexpected command in process_ldap_cmd");
     7369        uw_panic("Unexpected command in process_ldap_cmd");
    73707370        break;
    73717371    }
    73727372
  • alpine/alpine.c

    diff -urN alpine-2.00-patched/alpine/alpine.c alpine-2.00/alpine/alpine.c
    old new  
    23212321        break;
    23222322
    23232323      default:
    2324         panic("Unexpected command in choose_setup_cmd");
     2324        uw_panic("Unexpected command in choose_setup_cmd");
    23252325        break;
    23262326    }
    23272327
     
    33173317  This is also called from imap routines and fs_get and fs_resize.
    33183318  ----*/
    33193319void
    3320 panic(char *message)
     3320uw_panic(char *message)
    33213321{
    33223322    char buf[256];
    33233323
  • alpine/confscroll.c

    diff -urN alpine-2.00-patched/alpine/confscroll.c alpine-2.00/alpine/confscroll.c
    old new  
    52365236        }
    52375237        else{
    52385238            if(reset_character_set_stuff(&err) == -1)
    5239               panic(err ? err : "trouble with Character-Set");
     5239              uw_panic(err ? err : "trouble with Character-Set");
    52405240            else if(err){
    52415241                q_status_message(SM_ORDER | SM_DING, 3, 5, err);
    52425242                fs_give((void **) &err);
     
    52525252        }
    52535253        else{
    52545254            if(reset_character_set_stuff(&err) == -1)
    5255               panic(err ? err : "trouble with Character-Set");
     5255              uw_panic(err ? err : "trouble with Character-Set");
    52565256            else if(err){
    52575257                q_status_message(SM_ORDER | SM_DING, 3, 5, err);
    52585258                fs_give((void **) &err);
  • alpine/folder.c

    diff -urN alpine-2.00-patched/alpine/folder.c alpine-2.00/alpine/folder.c
    old new  
    10141014                  strncat(servpart, "#news.", sizeof(servpart)-1-strlen(servpart));
    10151015            }
    10161016            else
    1017               panic("Unexpected invalid server");
     1017              uw_panic("Unexpected invalid server");
    10181018        }
    10191019        else
    10201020          servpart[0] = '\0';
  • alpine/help.c

    diff -urN alpine-2.00-patched/alpine/help.c alpine-2.00/alpine/help.c
    old new  
    412412        break;
    413413
    414414      default :
    415         panic("Unhandled case");
     415        uw_panic("Unhandled case");
    416416    }
    417417
    418418    return(rv);
     
    878878        break;
    879879
    880880      default:
    881         panic("Unexpected command in journal_processor");
     881        uw_panic("Unexpected command in journal_processor");
    882882        break;
    883883    }
    884884   
  • alpine/mailcmd.c

    diff -urN alpine-2.00-patched/alpine/mailcmd.c alpine-2.00/alpine/mailcmd.c
    old new  
    14641464
    14651465          /*--------- Default, unknown command ----------*/
    14661466      default:
    1467         panic("Unexpected command case");
     1467        uw_panic("Unexpected command case");
    14681468        break;
    14691469    }
    14701470
     
    26572657    ESCKEY_S          ekey[10];
    26582658
    26592659    if(!cntxt)
    2660       panic("no context ptr in save_prompt");
     2660      uw_panic("no context ptr in save_prompt");
    26612661
    26622662    init_hist(&history, HISTSIZE);
    26632663
     
    30403040            break;
    30413041
    30423042          default :
    3043             panic("Unhandled case");
     3043            uw_panic("Unhandled case");
    30443044            break;
    30453045        }
    30463046
     
    56655665            break;
    56665666
    56675667          default :
    5668             panic("Unhandled case");
     5668            uw_panic("Unhandled case");
    56695669            break;
    56705670        }
    56715671
  • alpine/mailview.c

    diff -urN alpine-2.00-patched/alpine/mailview.c alpine-2.00/alpine/mailview.c
    old new  
    982982
    983983
    984984      default :
    985         panic("Unexpected HANDLE type");
     985        uw_panic("Unexpected HANDLE type");
    986986    }
    987987
    988988    return(0);
     
    10851085        }
    10861086
    10871087        if(l == start_line)
    1088           panic("Internal Error: no handle found");
     1088          uw_panic("Internal Error: no handle found");
    10891089        else
    10901090          start_line = l;
    10911091    }
  • alpine/radio.c

    diff -urN alpine-2.00-patched/alpine/radio.c alpine-2.00/alpine/radio.c
    old new  
    279279
    280280        if(flags & RB_RET_HELP){
    281281            if(help_text != NO_HELP)
    282               panic("RET_HELP and help in radio_buttons!");
     282              uw_panic("RET_HELP and help in radio_buttons!");
    283283
    284284            button_list[b].ch = '?';
    285285            button_list[b].rval = 3;
     
    359359    clrbitmap(bitmap);
    360360    memset(fkey_table, NO_OP_COMMAND, 12 * sizeof(int));
    361361    if(flags & RB_RET_HELP && help_text != NO_HELP)
    362       panic("RET_HELP and help in radio_buttons!");
     362      uw_panic("RET_HELP and help in radio_buttons!");
    363363
    364364    /* if shown, always at position 0 */
    365365    if(help_text != NO_HELP || flags & RB_RET_HELP){
     
    397397               && esc_list[i-start].label[0] != '\0'){  /* visible */
    398398                if(i == 12){  /* special case where we put it in help slot */
    399399                    if(help_text != NO_HELP)
    400                   panic("Programming botch in radio_buttons(): too many keys");
     400                  uw_panic("Programming botch in radio_buttons(): too many keys");
    401401
    402402                    if(esc_list[i-start].ch != -2)
    403403                      setbitn(0, bitmap); /* the help slot */
     
    419419                      rb_keymenu.keys[0].label = esc_list[i-start].label;
    420420                }
    421421                else
    422                   panic("Botch in radio_buttons(): too many keys");
     422                  uw_panic("Botch in radio_buttons(): too many keys");
    423423            }
    424424        }
    425425        else{
     
    822822     */
    823823    for(i=0; list1 && list1[i].ch != -1; i++){
    824824        if(list1[i].rval == list[j].rval)
    825           panic("1bad rval in d_r");
     825          uw_panic("1bad rval in d_r");
    826826        if(F_OFF(F_USE_FK,ps_global) && list1[i].ch == list[j].ch)
    827           panic("1bad ch in ccl");
     827          uw_panic("1bad ch in ccl");
    828828    }
    829829
    830830    for(i=0; list2 && list2[i].ch != -1; i++){
    831831        if(list2[i].rval == list[j].rval)
    832           panic("2bad rval in d_r");
     832          uw_panic("2bad rval in d_r");
    833833        if(F_OFF(F_USE_FK,ps_global) && list2[i].ch == list[j].ch)
    834           panic("2bad ch in ccl");
     834          uw_panic("2bad ch in ccl");
    835835    }
    836836
    837837    j++;
     
    839839    /* the visible set */
    840840    for(i=0; list1 && list1[i].ch != -1; i++){
    841841        if(i >= KEYS_PER_LIST && list1[i].label[0] != '\0')
    842           panic("too many visible keys in ccl");
     842          uw_panic("too many visible keys in ccl");
    843843
    844844        list[j++] = list1[i];
    845845    }
  • alpine/roleconf.c

    diff -urN alpine-2.00-patched/alpine/roleconf.c alpine-2.00/alpine/roleconf.c
    old new  
    59295929    char ***alval;
    59305930
    59315931    if(!(v && name))
    5932       panic("setup_dummy_pattern_var");
     5932      uw_panic("setup_dummy_pattern_var");
    59335933
    59345934    v->name = (char *) fs_get(strlen(name)+NOTLEN+1);
    59355935    snprintf(v->name, strlen(name)+NOTLEN+1, "%s%s", (defpat && defpat->not) ? NOT : "", name);
  • alpine/signal.c

    diff -urN alpine-2.00-patched/alpine/signal.c alpine-2.00/alpine/signal.c
    old new  
    174174/*----------------------------------------------------------------------
    175175     Handle signals caused by aborts -- SIGSEGV, SIGILL, etc
    176176
    177 Call panic which cleans up tty modes and then core dumps
     177Call uw_panic which cleans up tty modes and then core dumps
    178178  ----------------------------------------------------------------------*/
    179179static RETSIGTYPE
    180180auger_in_signal(int sig)
     
    187187    snprintf(buf, sizeof(buf), "Received abort signal(sig=%d)", sig);
    188188    buf[sizeof(buf)-1] = '\0';
    189189
    190     panic(buf);                         /* clean up and get out */
     190    uw_panic(buf);                              /* clean up and get out */
    191191
    192     exit(-1);                           /* in case panic doesn't kill us */
     192    exit(-1);                           /* in case uw_panic doesn't kill us */
    193193}
    194194
    195195
  • pith/adrbklib.c

    diff -urN alpine-2.00-patched/pith/adrbklib.c alpine-2.00/pith/adrbklib.c
    old new  
    43264326
    43274327    nn = (adrbk_cntr_t)n;
    43284328    if(!exp_head)
    4329       panic("exp_head not set in exp_set_expanded");
     4329      uw_panic("exp_head not set in exp_set_expanded");
    43304330
    43314331    for(e = exp_head; e->next; e = e->next)
    43324332      if(e->next->ent >= nn)
     
    43584358
    43594359    nn = (adrbk_cntr_t)n;
    43604360    if(!exp_head)
    4361       panic("exp_head not set in exp_unset_expanded");
     4361      uw_panic("exp_head not set in exp_unset_expanded");
    43624362
    43634363    for(e = exp_head; e->next; e = e->next)
    43644364      if(e->next->ent >= nn)
     
    43904390
    43914391    nn = (adrbk_cntr_t)n;
    43924392    if(!exp_head)
    4393       panic("exp_head not set in exp_del_nth");
     4393      uw_panic("exp_head not set in exp_del_nth");
    43944394
    43954395    e = exp_head->next;
    43964396    while(e && e->ent < nn)
     
    44304430
    44314431    nn = (adrbk_cntr_t)n;
    44324432    if(!exp_head)
    4433       panic("exp_head not set in exp_add_nth");
     4433      uw_panic("exp_head not set in exp_add_nth");
    44344434
    44354435    e = exp_head->next;
    44364436    while(e && e->ent < nn)
  • pith/charset.c

    diff -urN alpine-2.00-patched/pith/charset.c alpine-2.00/pith/charset.c
    old new  
    428428            if(utf8_charset(cset)){
    429429                if(!utf8_text(&src, cset, &xsrc, 0L)){
    430430                    /* should not happen */
    431                     panic("c-client failed to transliterate recognized characterset");
     431                    uw_panic("c-client failed to transliterate recognized characterset");
    432432                }
    433433            }
    434434            else{
     
    455455            if(!(cs->type == CT_ASCII || cs->type == CT_UTF8)){
    456456                if(!utf8_text_cs(&src, cs, &xsrc, 0L, 0L)){
    457457                    /* should not happen */
    458                     panic("c-client failed to transliterate recognized characterset");
     458                    uw_panic("c-client failed to transliterate recognized characterset");
    459459                }
    460460            }
    461461        }
     
    465465                && utf8_charset(cset)){
    466466                if(!utf8_text(&src, cset, &xsrc, 0L)){
    467467                    /* should not happen */
    468                     panic("c-client failed to transliterate recognized character set");
     468                    uw_panic("c-client failed to transliterate recognized character set");
    469469                }
    470470        }
    471471        else{
  • pith/conf.c

    diff -urN alpine-2.00-patched/pith/conf.c alpine-2.00/pith/conf.c
    old new  
    17981798     */
    17991799
    18001800    if(reset_character_set_stuff(&err) == -1)
    1801       panic(err ? err : "trouble with character set setup");
     1801      uw_panic(err ? err : "trouble with character set setup");
    18021802    else if(err){
    18031803        init_error(ps, SM_ORDER | SM_DING, 3, 5, err);
    18041804        fs_give((void **) &err);
     
    25832583              case 4: valptr = v->global_val.l; break;
    25842584              case 5: valptr = v->fixed_val.l; break;
    25852585              case 6: valptr = v->cmdline_val.l; break;
    2586               default: panic("bad case in convert_configvar");
     2586              default: uw_panic("bad case in convert_configvar");
    25872587            }
    25882588
    25892589            if(valptr){
     
    26092609              case 4: valptr = &v->global_val.p; break;
    26102610              case 5: valptr = &v->fixed_val.p; break;
    26112611              case 6: valptr = &v->cmdline_val.p; break;
    2612               default: panic("bad case in convert_configvar");
     2612              default: uw_panic("bad case in convert_configvar");
    26132613            }
    26142614
    26152615            if(valptr && *valptr && (*valptr)[0]){
     
    74357435
    74367436    snprintf(buf1, sizeof(buf1), "%.*s", MAX(sizeof(buf1) - 1 - strlen(message), 0), arg);
    74377437    snprintf(buf2, sizeof(buf2), message, buf1);
    7438     panic(buf2);
     7438    uw_panic(buf2);
    74397439}
    74407440
    74417441
  • pith/filter.c

    diff -urN alpine-2.00-patched/pith/filter.c alpine-2.00/pith/filter.c
    old new  
    363363            fs_give((void **) &sp);
    364364        }
    365365        else
    366           panic("Programmer botch: Can't unstack store readc");
     366          uw_panic("Programmer botch: Can't unstack store readc");
    367367    }
    368368    else
    369       panic("Programmer botch: NULL store clearing store readc");
     369      uw_panic("Programmer botch: NULL store clearing store readc");
    370370}
    371371
    372372
     
    397397            fs_give((void **) &sp);
    398398        }
    399399        else
    400           panic("Programmer botch: Can't unstack store writec");
     400          uw_panic("Programmer botch: Can't unstack store writec");
    401401    }
    402402    else
    403       panic("Programmer botch: NULL store clearing store writec");
     403      uw_panic("Programmer botch: NULL store clearing store writec");
    404404}
    405405
    406406
  • pith/folder.c

    diff -urN alpine-2.00-patched/pith/folder.c alpine-2.00/pith/folder.c
    old new  
    586586     * collection???
    587587     */
    588588    if(!prime)
    589       panic(_("No folder collections defined"));
     589      uw_panic(_("No folder collections defined"));
    590590
    591591    /*
    592592     * At this point, insert the INBOX mapping as the leading
  • pith/imap.c

    diff -urN alpine-2.00-patched/pith/imap.c alpine-2.00/pith/imap.c
    old new  
    642642void
    643643mm_fatal(char *message)
    644644{
    645     panic(message);
     645    uw_panic(message);
    646646}
    647647
    648648
  • pith/ldap.c

    diff -urN alpine-2.00-patched/pith/ldap.c alpine-2.00/pith/ldap.c
    old new  
    17001700        break;
    17011701   
    17021702      default:
    1703         panic("LDAP function not implemented");
     1703        uw_panic("LDAP function not implemented");
    17041704    }
    17051705#endif
    17061706
  • pith/mailcap.c

    diff -urN alpine-2.00-patched/pith/mailcap.c alpine-2.00/pith/mailcap.c
    old new  
    247247        return;
    248248
    249249      default:
    250         panic("Programmer botch in mc_process_file");
     250        uw_panic("Programmer botch in mc_process_file");
    251251        /*NOTREACHED*/
    252252    }
    253253
  • pith/mailcmd.c

    diff -urN alpine-2.00-patched/pith/mailcmd.c alpine-2.00/pith/mailcmd.c
    old new  
    12281228                break;
    12291229
    12301230              default:
    1231                 panic("Unexpected incoming startup case");
     1231                uw_panic("Unexpected incoming startup case");
    12321232                break;
    12331233
    12341234            }
  • pith/mailindx.c

    diff -urN alpine-2.00-patched/pith/mailindx.c alpine-2.00/pith/mailindx.c
    old new  
    11791179                    break;
    11801180                 
    11811181                  default:
    1182                     panic("Unhandled fixed case in setup_index_header");
     1182                    uw_panic("Unhandled fixed case in setup_index_header");
    11831183                    break;
    11841184                }
    11851185            }
     
    32793279    IELEM_S  *ielem;
    32803280
    32813281    if(!buf)
    3282       panic("NULL buf in simple_index_line()");
     3282      uw_panic("NULL buf in simple_index_line()");
    32833283
    32843284    if(buflen > 0)
    32853285      buf[0] = '\0';
     
    50525052                break;
    50535053         
    50545054              default:
    5055                 panic("Unhandled case in prio_str");
     5055                uw_panic("Unhandled case in prio_str");
    50565056                break;
    50575057            }
    50585058
  • pith/mimetype.c

    diff -urN alpine-2.00-patched/pith/mimetype.c alpine-2.00/pith/mimetype.c
    old new  
    175175            }
    176176        }
    177177        else
    178           panic("Unhandled mime type search");
     178          uw_panic("Unhandled mime type search");
    179179    }
    180180
    181181
  • pith/pattern.c

    diff -urN alpine-2.00-patched/pith/pattern.c alpine-2.00/pith/pattern.c
    old new  
    12941294    char  *p;
    12951295
    12961296    if(!patgrp)
    1297       panic("NULL patgrp to parse_patgrp_slash");
     1297      uw_panic("NULL patgrp to parse_patgrp_slash");
    12981298    else if(!(str && *str)){
    1299         panic("NULL or empty string to parse_patgrp_slash");
     1299        uw_panic("NULL or empty string to parse_patgrp_slash");
    13001300        patgrp->bogus = 1;
    13011301    }
    13021302    else if(!strncmp(str, "/NICK=", 6))
     
    15151515    NAMEVAL_S *v;
    15161516
    15171517    if(!action)
    1518       panic("NULL action to parse_action_slash");
     1518      uw_panic("NULL action to parse_action_slash");
    15191519    else if(!(str && *str))
    1520       panic("NULL or empty string to parse_action_slash");
     1520      uw_panic("NULL or empty string to parse_action_slash");
    15211521    else if(!strncmp(str, "/ROLE=1", 7))
    15221522      action->is_a_role = 1;
    15231523    else if(!strncmp(str, "/OTHER=1", 8))
  • pith/save.c

    diff -urN alpine-2.00-patched/pith/save.c alpine-2.00/pith/save.c
    old new  
    239239        break;
    240240     
    241241      default:
    242         panic(botch);
     242        uw_panic(botch);
    243243        break;
    244244    }
    245245
  • pith/send.c

    diff -urN alpine-2.00-patched/pith/send.c alpine-2.00/pith/send.c
    old new  
    428428        fields[++i]   = "X-Our-ReplyTo";        /* ReplyTo is real */
    429429        fields[++i]   = "Lcc";          /* Lcc: too... */
    430430        if(++i != FIELD_COUNT)
    431           panic("Fix FIELD_COUNT");
     431          uw_panic("Fix FIELD_COUNT");
    432432
    433433        for(pf = *custom; pf && pf->name; pf = pf->next)
    434434          if(!pf->standard)
     
    30873087      return((char *)s);
    30883088   
    30893089    if(dlen < SIZEOF_20KBUF)
    3090       panic("bad call to encode_header_value");
     3090      uw_panic("bad call to encode_header_value");
    30913091
    30923092    if(!encode_all){
    30933093        /*
  • pith/sort.c

    diff -urN alpine-2.00-patched/pith/sort.c alpine-2.00/pith/sort.c
    old new  
    487487    dprint((2, "sort_sort_callback\n"));
    488488
    489489    if(mn_get_total(g_sort.msgmap) < nmsgs)
    490       panic("Message count shrank after sort!");
     490      uw_panic("Message count shrank after sort!");
    491491
    492492    /* copy ulongs to array of longs */
    493493    for(i = nmsgs; i > 0; i--)
  • pith/stream.c

    diff -urN alpine-2.00-patched/pith/stream.c alpine-2.00/pith/stream.c
    old new  
    17281728                 * partial text.
    17291729                 */
    17301730                if(!str_to_free)
    1731                   panic("Programmer botch: partial fetch attempt w/o string pointer");
     1731                  uw_panic("Programmer botch: partial fetch attempt w/o string pointer");
    17321732                else
    17331733                  *str_to_free = (char *) new_text.data;
    17341734            }
  • pith/string.c

    diff -urN alpine-2.00-patched/pith/string.c alpine-2.00/pith/string.c
    old new  
    26442644    char *ans = NULL;
    26452645
    26462646    if(!quote_these_chars)
    2647       panic("bad arg to add_escapes");
     2647      uw_panic("bad arg to add_escapes");
    26482648
    26492649    if(src){
    26502650        char *q, *p, *qchar;
  • pith/util.h

    diff -urN alpine-2.00-patched/pith/util.h alpine-2.00/pith/util.h
    old new  
    5656/* currently mandatory to implement stubs */
    5757
    5858/* called when we detect a serious program error */
    59 void      panic(char *);
     59void      uw_panic(char *);
    6060
    6161/* called when testing to see if panic state is in effect */
    6262int      panicking(void);
  • web/src/alpined.d/signal.c

    diff -urN alpine-2.00-patched/web/src/alpined.d/signal.c alpine-2.00/web/src/alpined.d/signal.c
    old new  
    117117/*----------------------------------------------------------------------
    118118     Handle signals caused by aborts -- SIGSEGV, SIGILL, etc
    119119
    120 Call panic which cleans up tty modes and then core dumps
     120Call uw_panic which cleans up tty modes and then core dumps
    121121  ----------------------------------------------------------------------*/
    122122static RETSIGTYPE
    123123auger_in_signal(int sig)
     
    128128      (void) unlink(peSocketName);
    129129
    130130    snprintf(tmp_20k_buf, SIZEOF_20KBUF, "Abort: signal %d", sig);
    131     panic(tmp_20k_buf);         /* clean up and get out */
    132     exit(-1);                   /* in case panic doesn't kill us */
     131    uw_panic(tmp_20k_buf);              /* clean up and get out */
     132    exit(-1);                   /* in case uw_panic doesn't kill us */
    133133}
    134134
    135135