Current area: HOME ->

Zip File view

Ezasm for linux 1.0


This page allows you to view the contents of a file contained inside a ZIP archive available at Programmer's Heaven. This means you can view the code and find what you need from it without having to download the ZIP file first. If the file contains source code for a language we recognize, we have syntax highlighted it.

Filename displayed: ezasm\num.cpp
Found in file: 40439.zip

Download: uCertify OCA DBA10g (1Z0-042) exam 8.06.05 PrepKit OCA DBA10g 1Z0-042, Oracle Database 10g: Admin I is an interactive software application that helps you learn, tracks your progress, identifies areas for improvements and simulates the actual ...
//module for identifying numeric constants as hex,bin,decimal
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
char v[30];
char value[30];
int error=0;
char * check(char n[],int w)
{
        extern int num_count;
        extern int line_count;
        extern int err_count;
        int i;
        int pad;
        int ln=strlen(n);
        int dn=0,t,y,x,l,j=0;
        char r[30];     
        char c=n[ln-1];  
        if(!isdigit(n[0]))
        {
                printf("Error");
                exit(0);
        }
        for(i=0;i<ln-1;i++)
        {
        if(!(isdigit(n[i]) || (n[i]>='a' && n[i]<='f')))       
        {printf("\nNot a Valid Number Representation (%d) ",line_count);err_count++;}
        }
        for(i=0;i<ln-1;i++)
        value[i]=n[i];
        value[i]='\0';
        l=strlen(value);
        switch(c)
        {
                case 'b':                     
                          break;
                case 'h':                                          
                        for(i=0;i<l;i++)
                        {
                                switch(value[i])
                                {
                                case '0': strcpy(r+j,"0000");
                                        break;
                                case '1': strcpy(r+j,"0001");
                                        break;
                                case '2': strcpy(r+j,"0010");
                                        break;
                                case '3': strcpy(r+j,"0011");
                                       break;
                                case '4': strcpy(r+j,"0100");
                                       break;
                                case '5': strcpy(r+j,"0101");
                                        break;
                                case '6': strcpy(r+j,"0110");
                                        break;
                                case '7': strcpy(r+j,"0111");
                                        break;
                                case '8': strcpy(r+j,"1000");
                                        break;
                                case '9': strcpy(r+j,"1001");
                                        break;
                                case 'a': strcpy(r+j,"1010");
                                        break;
                                case 'b': strcpy(r+j,"1011");
                                        break;
                                case 'c': strcpy(r+j,"1100");
                                       break;
                                case 'd': strcpy(r+j,"1101");
                                        break;
                                case 'e': strcpy(r+j,"1110");
                                         break;
                                case 'f': strcpy(r+j,"1111");
                                  break;                                                                }
                          j+=4;
                        }
                        r[j]='\0';                 
                        strcpy(value,r);
                        break;         
                case 'd':                     
                        l=strlen(value);                       
                        for(i=0;i<l;i++)
                        {
                         t=value[i]-48;
                        dn=dn+pow(10,l-i-1)*t;
                        }
                        i=0;           
                        while(dn>0)
                        {
                                x=dn%2;
                                value[i]=x+48;       
                                i++;
                                dn=dn/2;
                        }
                        value[i]='\0';
                        l=strlen(value);                       
                        y=8-l%8;
                        y=y%8;     
                        for(j=1;j<=y;j++)
                        value[i++]='0';
                        value[i]='\0';     
                        l=strlen(value);
                        for(i=0;i<strlen(value);i++)
                        r[l-i-1]=value[i];                                                 
                        r[i]='\0';
                        strcpy(value,r);
                        break
                default:printf("\nType of data unknown line (%d)",line_count);
                        err_count++;
        }
        l=strlen(value);
        switch(w)
        {
        case -1:
                if(l<=8) pad=8
                else if(l>8 && l<=16) pad=16;
                break;
        case 0: pad=8;
                break;
        case 1: pad=16;
                break
        }       
        l=strlen(value);
        if(pad-l>0)
        {
        for(i=0;i<pad-l;i++)
        v[i]='0';
        v[i]='\0';
        strcat(v,value);
        }
        else if(pad==l) strcpy(v,value);
        else {printf("\nData Out of Range line(%d)",line_count);err_count++;}
        return v;
}


Secure iNet Factory 6.2
Suite of easy-to-use Java based components for developing secure network capable applications. Support for protocols such as FTP, FTPS, SFTP, SSH, telnet, SMTP, POP3, IMAP, MIME, SSL and more.
DS Blobs - Enhance your web site with this cool effect v1.0
This applet displays a blobs effect over any image. Over the animation you can also insert an image and a scroll-text. The applet is interactive and includes a HTML code generator that allows t...
uCertify OCA DBA10g (1Z0-042) exam 8.06.05
PrepKit OCA DBA10g 1Z0-042, Oracle Database 10g: Admin I is an interactive software application that helps you learn, tracks your progress, identifies areas for improvements and simulates the actual ...
Download Secure iNet Factory 6.2 Suite of easy-to-use Java based components for developing secure network capable applications. Support for protocols such as FTP, FTPS, SFTP, SSH, telnet, SMTP, POP3, IMAP, MIME, SSL and more. Download DS Blobs - Enhance your web site with this cool effect v1.0 This applet displays a blobs effect over any image. Over the  animation you can also insert an image and a scroll-text. The  applet is interactive and includes a HTML code generator that  allows t... Download uCertify OCA DBA10g (1Z0-042) exam 8.06.05 PrepKit OCA DBA10g 1Z0-042, Oracle Database 10g: Admin I is an interactive software application that helps you learn, tracks your progress, identifies areas for improvements and simulates the actual ...







Sponsored links

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Localize software in three simple steps
Localize .Net, C/C++ & Delphi apps visually. HTML, HTML Help, XML & databases. Try Sisulizer now!
Localize Delphi software in three simple steps
Localize Delphi VCL & .Net apps visually. Plus HTML, HTML Help, XML & databases. Try Sisulizer now!
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.


Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.