Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
March 10, 2002 Clipper | ||||
---|---|---|---|---|
| ||||
I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled with dm to link with a Clipper test. my problem lies in printf(), if I put a newline in format, clipper will 'Stack Overflow'. So I'm wondering what sort of special somethings going on when I put a newline in printf's format. printf("hello world"); works printf("hello world\n"); blows up any suggestions or experiences? -ryan |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan Barber | "Ryan Barber" <rfb@bookmanager.com> wrote in message news:a6gg9g$i4f$1@digitaldaemon.com... > I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled with dm to link with a Clipper test. > > my problem lies in printf(), if I put a newline in format, clipper will > 'Stack Overflow'. > > So I'm wondering what sort of special somethings going on when I put a newline in printf's format. > > printf("hello world"); works > printf("hello world\n"); blows up > > any suggestions or experiences? > -ryan I use it all the time. Can you post a complete example? Be aware that problems like this are common under DOS, as it has no memory protection and a bug in one part of the program can step all over code & data anywhere in memory, causing havoc. The best way is to debug the code in protected mode, using a 286 DOS extender or OS/2 before trying it in real mode DOS. |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | cliplib.c -- #include <extend.h> #include <stdio.h> CLIPPER test_one() { printf("test\n"); } clipprg.prg -- func testclip() ? "running test_one" ? test_one() return nil test.lnk -- STACK 16384 MIXCASE BLINKER INCREMENTAL OFF BLINKER EXECUTABLE NODELETE FILE clipprg FILE cliplib SEARCH C:\ver8\CL52D\LIB\clipper LIB C:\ver8\CL52D\LIB\extend LIB C:\ver8\CL52D\LIB\terminal LIB C:\ver8\CL52D\LIB\dbfntx LIB C:\dev\dm\lib\sdl OUTPUT test.exe c.bat -- \dev\CL52D\BIN\CLIPPER.EXE clipprg.prg /a /m /n /w \dev\dm\bin\sc -Iinclude -ml -c cliplib.c \dev\BL310\BLINKER.EXE @test I took the blinker settings off a post I found on comp.lang.c you use Clipper too? -Ryan "Walter" <walter@digitalmars.com> wrote in message news:a6h5vr$po0$1@digitaldaemon.com... > > "Ryan Barber" <rfb@bookmanager.com> wrote in message news:a6gg9g$i4f$1@digitaldaemon.com... > > I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled with > > dm to link with a Clipper test. > > > > my problem lies in printf(), if I put a newline in format, clipper will > > 'Stack Overflow'. > > > > So I'm wondering what sort of special somethings going on when I put a newline in printf's format. > > > > printf("hello world"); works > > printf("hello world\n"); blows up > > > > any suggestions or experiences? > > -ryan > > I use it all the time. Can you post a complete example? Be aware that problems like this are common under DOS, as it has no memory protection and > a bug in one part of the program can step all over code & data anywhere in memory, causing havoc. > > The best way is to debug the code in protected mode, using a 286 DOS extender or OS/2 before trying it in real mode DOS. > > |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan Barber | I've never heard of clipper before this. "Ryan Barber" <rfb@bookmanager.com> wrote in message news:a6iqrh$1gjl$1@digitaldaemon.com... > cliplib.c -- > > #include <extend.h> > #include <stdio.h> > > CLIPPER test_one() { > printf("test\n"); > } > > clipprg.prg -- > > func testclip() > ? "running test_one" > ? test_one() > return nil > > test.lnk -- > > STACK 16384 > MIXCASE > BLINKER INCREMENTAL OFF > BLINKER EXECUTABLE NODELETE > > FILE clipprg > FILE cliplib > > SEARCH C:\ver8\CL52D\LIB\clipper > LIB C:\ver8\CL52D\LIB\extend > LIB C:\ver8\CL52D\LIB\terminal > LIB C:\ver8\CL52D\LIB\dbfntx > LIB C:\dev\dm\lib\sdl > > OUTPUT test.exe > > c.bat -- > > \dev\CL52D\BIN\CLIPPER.EXE clipprg.prg /a /m /n /w \dev\dm\bin\sc -Iinclude -ml -c cliplib.c \dev\BL310\BLINKER.EXE @test > > I took the blinker settings off a post I found on comp.lang.c > > you use Clipper too? > > -Ryan > > "Walter" <walter@digitalmars.com> wrote in message news:a6h5vr$po0$1@digitaldaemon.com... > > > > "Ryan Barber" <rfb@bookmanager.com> wrote in message news:a6gg9g$i4f$1@digitaldaemon.com... > > > I'm working on extending a Clipper app, and after searching for a recent > > > compiler that will do 16bit, I found Digital Mars. now, A couple days of > > > struggle, and alot of learning, I've got my simple C library compiled > with > > > dm to link with a Clipper test. > > > > > > my problem lies in printf(), if I put a newline in format, clipper will > > > 'Stack Overflow'. > > > > > > So I'm wondering what sort of special somethings going on when I put a newline in printf's format. > > > > > > printf("hello world"); works > > > printf("hello world\n"); blows up > > > > > > any suggestions or experiences? > > > -ryan > > > > I use it all the time. Can you post a complete example? Be aware that problems like this are common under DOS, as it has no memory protection > and > > a bug in one part of the program can step all over code & data anywhere in > > memory, causing havoc. > > > > The best way is to debug the code in protected mode, using a 286 DOS extender or OS/2 before trying it in real mode DOS. > > > > > > |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan Barber | Could you try the same thing with puts or fputs?
Jan
Ryan Barber wrote:
> I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled with dm to link with a Clipper test.
>
> my problem lies in printf(), if I put a newline in format, clipper will
> 'Stack Overflow'.
>
> So I'm wondering what sort of special somethings going on when I put a newline in printf's format.
>
> printf("hello world"); works
> printf("hello world\n"); blows up
>
> any suggestions or experiences?
> -ryan
|
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Yea, I had to wonder, why would you be using Clipper if wrote compilers? Clippers is an X-Base style application development system for DOS. newer projects are Harbour, (www.harbour-project.org), but I'm not sure if my boss is willing to go thru the pain of upgrading to it. My C knowledge is pretty limited, but I'm working on it, until now I've only really done server side perl and paint by numbers C++/MFC. -Ryan "Walter" <walter@digitalmars.com> wrote in message news:a6j37m$1k0j$1@digitaldaemon.com... > I've never heard of clipper before this. |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | mm, same result. maybe Clippers handling stdout diffrently? -Ryan "Jan Knepper" <jan@smartsoft.cc> wrote in message news:3C8D12C6.9B5D1534@smartsoft.cc... > Could you try the same thing with puts or fputs? > Jan > > > > Ryan Barber wrote: > > > I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled with > > dm to link with a Clipper test. > > > > my problem lies in printf(), if I put a newline in format, clipper will > > 'Stack Overflow'. > > > > So I'm wondering what sort of special somethings going on when I put a newline in printf's format. > > > > printf("hello world"); works > > printf("hello world\n"); blows up > > > > any suggestions or experiences? > > -ryan > |
March 11, 2002 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan Barber | try '\n' with putc/putchar/fputc
Jan
Ryan Barber wrote:
> mm, same result. maybe Clippers handling stdout diffrently?
>
> -Ryan
>
> "Jan Knepper" <jan@smartsoft.cc> wrote in message news:3C8D12C6.9B5D1534@smartsoft.cc...
> > Could you try the same thing with puts or fputs?
> > Jan
> >
> >
> >
> > Ryan Barber wrote:
> >
> > > I'm working on extending a Clipper app, and after searching for a recent compiler that will do 16bit, I found Digital Mars. now, A couple days of struggle, and alot of learning, I've got my simple C library compiled
> with
> > > dm to link with a Clipper test.
> > >
> > > my problem lies in printf(), if I put a newline in format, clipper will
> > > 'Stack Overflow'.
> > >
> > > So I'm wondering what sort of special somethings going on when I put a newline in printf's format.
> > >
> > > printf("hello world"); works
> > > printf("hello world\n"); blows up
> > >
> > > any suggestions or experiences?
> > > -ryan
> >
|
February 24, 2011 Re: Clipper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan Barber | neebles test neebles |
Copyright © 1999-2021 by the D Language Foundation