⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 用于TM1300/PNX1300系列DSP(主要用于视频处理)的动态下载程序源码。
💻 C
字号:
/*
 * Copyright (c) 1995,2000 TriMedia Technologies Inc.       
 *
 * +------------------------------------------------------------------+
 * | This software is furnished under a license and may only be used  |
 * | and copied in accordance with the terms and conditions of  such  |
 * | a license and with the inclusion of this copyright notice. This  |
 * | software or any other copies of this software may not be provided|
 * | or otherwise made available to any other person.  The ownership  |
 * | and title of this software is not transferred.                   |
 * |                                                                  |
 * | The information in this software is subject  to change without   |
 * | any  prior notice and should not be construed as a commitment by |
 * | TriMedia Technologies.                                           |
 * |                                                                  |
 * | this code and information is provided "as is" without any        |
 * | warranty of any kind, either expressed or implied, including but |
 * | not limited to the implied warranties of merchantability and/or  |
 * | fitness for any particular purpose.                              |
 * +------------------------------------------------------------------+
 *
 *  Module name              : main.c    1.2
 *
 *  Last update              : 17:09:11 - 00/06/16
 *
 *  Description              : Simple implicit loader error handler
 *                             example.
 *
 */

#include <tmlib/tmtypes.h>
#include <tmlib/DynamicLoader.h>
#include <setjmp.h>
#include <stdio.h>

void dll_function( int x );


static jmp_buf  jb;

static void error_handler (DynLoad_Status status, String dll_name)
{
    printf("*** Implicit loading of %s failed; error= %d\n", dll_name, status);
    longjmp(jb,1);
}


void main()
{
    Int i;

    DynLoad_ErrorFun errh= error_handler;

    DynLoad_swap_stub_error_handler( &errh );

    for (i=0; i<10; i++) {
        if (setjmp(jb) == 0) {
            dll_function(i);
        } else {
            printf("--> recovering\n");
        }
    }

    exit(0);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -