How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask ATLPROG Your Own Question
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

To C expert: How to convert my C source code to standard C

Customer Question

To C expert: How to convert my C source code to standard C source code so that it includes only standard C header files? My C source coding includes "CB.h", which is not an ANSI C standard C header file. The following five header files are included.
#include "CB.h"
My C source code is 100% accurate as it compiles fine and creates the exe file using Microsoft Visual Studio 2015. Because of the "CB.h" header file, my C source coding mostly contains keywords starting with "_mb" (_mbprnt instead of printf) as shown in the following C code:
void main()
_mbindex = 0;
if (setjmp(_mbonj) == 0) goto final9;
final9: if (_mbindex != -1)
if (setjmp(_mbxfile) == 0) _mbiend();
if (((errl() > 0) & _mbsneq(err(),NULL))) {
_mbprnt("cs.","There was an error with code ",err());
_mbprnt("ci.","Error on line",errl());
_mbprnt("ci.","Extended error code",errx());
Submitted: 6 months ago.
Category: Programming
Expert:  Steve replied 6 months ago.

Hi there, my name is***** is CB.h? Can you post that file? Also, is the code you posted the entire C program?

Customer: replied 6 months ago.
Thanks Steve. Here are CB.h and faom.c (complete code that compiles fine) as well as and cb32.lib files.Please let me know if you want to look at any other file.
Customer: replied 6 months ago.
Are you online?
Expert:  Steve replied 6 months ago.

Hi there. I've taken a look and it's a pretty big job to go through all that. I'm going to opt out and see if there is someone else who wants to help you. I can give you a few tips:

1) Normally what you would do is compile without the header file and then go reconcile anything that's unresolved.

2) PASCAL NEAR and FAR are not relevant and the compiler will map them to void. We use a flat memory model now in a single code segment.

Sorry I couldn't be of more help.

Customer: replied 6 months ago.
62;I've taken a look and it's a pretty big job to go through all that.I have a very short .c file for displaying just one line "Hello World.". Want to take a look at this small file instead of the one I sent to you?
Customer: replied 6 months ago.

Related Programming Questions