Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

learn as one goes

0 views
Skip to first unread message

Adrian Suri

unread,
Mar 15, 2007, 11:25:06 AM3/15/07
to
Hi

updating a lesson to yahoo group, I "borrowed" some code from the rexx
utils packet and stuffed it into my own header file thus

#ifndef _CLEAR_HPP
#define _CLEAR_HPP
#define INCL_VIO
#define INCL_ERRORS
#include<os2.h>

void DosCls(){

BYTE bCell[2];
bCell[0] = 0x20; /* Space Character */
bCell[1] = 0x07; /* Default Attrib */
VioScrollDn( 0, 0, (USHORT)0xFFFF, (USHORT)0XFFFF, (USHORT)0xFFFF,
Cell, (HVIO) 0); /* CLS */
VioSetCurPos(0, 0, (HVIO) 0); /* Pos cursor */
};
#endif

on the whole it seemed to work, for example see the attached file, but
as soon as I start making calls to other OS/2 api I then get these errors:

../include/clear.hpp(12): Error! E121: col(84) syntax error
../include/clear.hpp(12): Note! N393: col(84) included from
F:\PROJECTS\CPP\overveiw\os2\usedos.cpp(13)
../include/clear.hpp(13): Error! E121: col(29) syntax error
F:\PROJECTS\CPP\overveiw\os2\usedos.cpp: 101 lines, included 12649, no
warnings, 2 errors
Error: Compiler returned a bad status compiling
"F:\PROJECTS\CPP\overveiw\os2\usedos.cpp"

Any ideas... I know its a little vague sorry

Regards

Adrian Suri

addFix6.cpp

Aidan Grey

unread,
Mar 15, 2007, 8:41:17 PM3/15/07
to
On Thu, 15 Mar 2007 15:25:06 GMT, Adrian Suri wrote:

>Hi
>
>updating a lesson to yahoo group, I "borrowed" some code from the rexx
>utils packet and stuffed it into my own header file thus
>
>#ifndef _CLEAR_HPP
>#define _CLEAR_HPP
>#define INCL_VIO
>#define INCL_ERRORS
>#include<os2.h>
>

( Snip)
>#endif
>
( Snip )

What happens if you move the #endif line, and put it directly
after the #define _CLEAR_HPP line?
The only thought I have is that if CLEAR_HPP is defined, you
are either not including os2.h, or you are including with some
defines missing.

Aidan Grey

Adrian Suri

unread,
Mar 16, 2007, 2:24:19 AM3/16/07
to
Hi Aidan Grey wrote:

many thanks for your help, it got me thinking this direction, Fixed the
problem by moving the include statement before os2.h like this, also
tried renaming it.. but the move worked ...

#define INCL_DOSPROCESS
#define INCL_DOSFILEMGR
#define INCL_DOSERRORS
#define INCL_DOSMISC
#include <conio> // for get char
#include <iostream>
#include<cstdlib>
#include<cctype>
#include "../include/extraapi.hpp"
#include<os2.h>


Many thanks

Adrian

0 new messages