Changeset 2639


Ignore:
Timestamp:
Apr 22, 2009 3:32:12 PM (10 years ago)
Author:
nanang
Message:

Ticket #774: Replaced abort() & printf(), which caused linking error on WM platforms, with pj_assert().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/g7221/common/basic_op.c

    r2623 r2639  
    1111*/ 
    1212 
    13 #include <stdio.h> 
    14 #include <stdlib.h> 
     13//#include <stdio.h> 
     14//#include <stdlib.h> 
    1515#include "typedef.h" 
    1616#include "basic_op.h" 
     17#include <pj/assert.h> 
    1718 
    1819#if (WMOPS) 
     
    12001201    if ((var1 > var2) || (var1 < 0) || (var2 < 0)) 
    12011202    { 
    1202         printf ("Division Error var1=%d  var2=%d\n", var1, var2); 
    1203         abort(); /* exit (0); */ 
     1203        //printf ("Division Error var1=%d  var2=%d\n", var1, var2); 
     1204        //abort(); /* exit (0); */ 
     1205        pj_assert(!"Division Error"); 
    12041206    } 
    12051207    if (var2 == 0) 
    12061208    { 
    1207         printf ("Division by 0, Fatal error \n"); 
    1208         abort(); /* exit (0); */ 
     1209        //printf ("Division by 0, Fatal error \n"); 
     1210        //abort(); /* exit (0); */ 
     1211        assert(!"Division by 0"); 
    12091212    } 
    12101213    if (var1 == 0) 
     
    14401443 
    14411444    if ( den == (Word16) 0 ) { 
    1442         printf("Division by 0 in div_l, Fatal error \n"); 
    1443         exit(0); 
     1445        //printf("Division by 0 in div_l, Fatal error \n"); 
     1446        //exit(0); 
     1447        assert(!"Division by 0"); 
    14441448    } 
    14451449 
    14461450    if ( (L_num < (Word32) 0) || (den < (Word16) 0) ) { 
    1447         printf("Division Error in div_l, Fatal error \n"); 
    1448         exit(0); 
     1451        //printf("Division Error in div_l, Fatal error \n"); 
     1452        //exit(0); 
     1453        assert(!"Division Error"); 
    14491454    } 
    14501455 
Note: See TracChangeset for help on using the changeset viewer.