Changeset 7150 for trunk/tools


Ignore:
Timestamp:
Oct 22, 2001, 6:11:08 AM (24 years ago)
Author:
bird
Message:

Fixing kLog features...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/vslick/odin32.e

    r7149 r7150  
    1 /* $Id: odin32.e,v 1.7 2001-10-22 03:54:53 bird Exp $
     1/* $Id: odin32.e,v 1.8 2001-10-22 04:11:08 bird Exp $
    22 *
    33 * Visual SlickEdit Documentation Macros.
     
    2626 * Ctrl+Shift+B: KLOGENTRYX(..)
    2727 * Ctrl+Shift+E: KLOGEXIT(..)
    28  * Ctrl+Shift+Q: Do kLog stuff for the current file.
     28 * Ctrl+Shift+N: Do kLog stuff for the current file. No questions.
     29 * Ctrl+Shift+Q: Do kLog stuff for the current file. Ask a lot of questions.
    2930 *
    3031 * Remember to set the correct sOdin32UserName, sOdin32UserEmail and sOdin32UserInitials
     
    4546def  'C-S-K' = odin32_constbox
    4647def  'C-S-M' = odin32_modulebox
     48def  'C-S-N' = odin32_klog_file_no_ask
    4749def  'C-S-O' = odin32_oneliner
    48 def  'C-S-Q' = odin32_klog_file
     50def  'C-S-Q' = odin32_klog_file_ask
    4951def  'C-S-S' = odin32_structbox
    5052def  'C-S-T' = odin32_maketagfile
     
    310312    if (file_eq(p_extension, 'asm'))
    311313    {
    312         _insert_text("; $Id: odin32.e,v 1.7 2001-10-22 03:54:53 bird Exp $\n");
     314        _insert_text("; $Id: odin32.e,v 1.8 2001-10-22 04:11:08 bird Exp $\n");
    313315        _insert_text("; \n");
    314316        _insert_text("; \n");
     
    323325    else
    324326    {
    325         _insert_text("/* $Id: odin32.e,v 1.7 2001-10-22 03:54:53 bird Exp $\n");
     327        _insert_text("/* $Id: odin32.e,v 1.8 2001-10-22 04:11:08 bird Exp $\n");
    326328        _insert_text(" * \n");
    327329        _insert_text(" * \n");
     
    449451            else
    450452            {
    451                 if (sType == 'unsigned' || sType == 'UNSIGNED' || sType == 'DWORD' || sType == 'ULONG' || sType == 'UINT')
     453                if (sType == 'unsigned' || sType == 'UNSIGNED' || sType == 'UINT')
    452454                    _insert_text("KLOGEXITUINT();");
    453                 else if (sType == 'unsigned' || sType == 'UNSIGNED' || sType == 'DWORD' || sType == 'ULONG' || sType == 'UINT')
     455                else if (sType == 'int' || sType == 'INT')
    454456                    _insert_text("KLOGEXITINT();");
    455                 else if (sType == 'void *' || sType == 'VOID *' || sType == 'PVOID')
     457                else if (sType == 'void *' || sType == 'VOID *' || sType == 'PVOID' || sType == 'LPVOID')
    456458                    _insert_text("KLOGEXITHEX();");
    457459                else
     
    512514
    513515/**
    514  * Goes thru a file.
    515  */
    516 void odin32_klog_file()
     516 * Processes a file - ask user all the time.
     517 */
     518void odin32_klog_file_ask()
     519{
     520    odin32_klog_file_int(true)
     521}
     522
     523
     524/**
     525 * Processes a file - no questions.
     526 */
     527void odin32_klog_file_no_ask()
     528{
     529    odin32_klog_file_int(false)
     530}
     531
     532
     533
     534/**
     535 * Processes a file.
     536 */
     537static void odin32_klog_file_int(boolean fAsk)
    517538{
    518539    show_all();
     
    521542
    522543    /* ask question so we can get to the right position somehow.. */
    523     if (_message_box("kLog process this file?", "Visual SlickEdit", MB_YESNO | MB_ICONQUESTION) != IDYES)
     544    if (fAsk && _message_box("kLog process this file?", "Visual SlickEdit", MB_YESNO | MB_ICONQUESTION) != IDYES)
    524545        return;
    525546
     
    529550    while (!prev_proc())
    530551    {
     552        //say 'entry main loop: ' odin32_getfunction();
     553
    531554        /*
    532555         * Skip prototypes.
     
    541564        _refresh_scroll();
    542565        sFunction = odin32_getfunction();
    543         rc = _message_box("Process this function ("sFunction")?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION);
     566        rc = fAsk ? _message_box("Process this function ("sFunction")?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION) : IDYES;
    544567        if (rc == IDYES)
    545568        {
     
    563586        _save_pos2(procpos);
    564587        sCurFunction = odin32_getfunction();
     588        //say 'exit main loop: ' sCurFunction
    565589
    566590        /*
     
    575599        while (!search("return", "WE<+") && odin32_getfunction() == sCurFunction)
    576600        {
     601            //say 'exit sub loop: ' p_line
    577602            /*
    578603             * Ask User.
     
    581606            _refresh_scroll();
    582607            sFunction = odin32_getfunction();
    583             rc = _message_box("Process this exit from "sFunction"?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION);
     608            rc =  fAsk ? _message_box("Process this exit from "sFunction"?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION) : IDYES;
    584609            deselect();
    585610            if (rc == IDYES)
     
    620645                    _refresh_scroll();
    621646                    sFunction = odin32_getfunction();
    622                     rc = _message_box("Process this exit from "sFunction"?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION);
     647                    rc = fAsk ? _message_box("Process this exit from "sFunction"?", "Visual SlickEdit", MB_YESNOCANCEL | MB_ICONQUESTION) : IDYES;
    623648                    deselect();
    624649                    if (rc == IDYES)
     
    923948            iParLevel--;
    924949    }
    925 
    926     say 'returntype='odin32_getreturntype(true);
    927950
    928951    return iCurParam + 1;
Note: See TracChangeset for help on using the changeset viewer.