delorie.com/djgpp/doc/libc/libc_418.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

gettext

Syntax

 
#include <conio.h>

int     gettext(int _left, int _top, int _right, int _bottom,
                void *_destin);

Description

Retrieve a block of screen characters into a buffer. gettext is a macro defined in conio.h that will expand into _conio_gettext (see section _conio_gettext). This is needed to resolve the name conflict existing between the gettext function from libintl.a defined in libintl.h and this one defined in conio.h. If you want to use both gettext functions in the same source file you must use _conio_gettext (see section _conio_gettext) to get the gettext function from conio.h. This means that if both headers are included in the same source file the gettext keyword will always be reserved for the gettext function defined in libintl.h and indeed will always make reference to the gettext function from libintl.a.

Return Value

1

Portability

ANSI/ISO C No
POSIX No

Implementation Note

It's not safe to call this function inside static constructors, because conio needs to be initialized, and its initialization is done by a static constructor. Since you don't have any control on the order in which static constructors are called (it's entirely up to the linker), you could have problems.

If you can detect the situation when one of the conio functions is called for the very first time since program start, you could work around this problem by calling the gppconio_init function manually (this is the function called by a static constructor).


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004