 |
| Recent blog posts: | |
 |
| They have birthday today: | |
 |
| Forums: | | |
 |
| Discuss: | |
 |
| Recent forum topics: | |
 |
| Recent forum comments: | |
 |
| Модератор: | |
 |
Friday, 26 February 2010
|
| <graphics.h> Header file.( Attachment ) Raman Gopalan 16:07:26 |
| | /*graphics.h
Definitions for Graphics Package.
Copyright (c) Borland International 1987,1988,1990 All Rights Reserved. */
#if __STDC__ #define _Cdecl #else #define _Cdeclcdecl #endif
#if !defined(__GRAPHX_DEF_) #define __GRAPHX_DEF_
enum graphics_errors {/* graphresult error return codes */ grOk = 0, grNoInitGraph = -1, grNotDetected = -2, grFileNotFound = -3, grInvalidDriver = -4, grNoLoadMem = -5, grNoScanMem = -6, grNoFloodMem = -7, grFontNotFound = -8, grNoFontMem = -9, grInvalidMode = -10, grError = -11, /* generic error */ grIOerror = -12, grInvalidFont = -13, grInvalidFontNum = -14, grInvalidVersion = -18 };
enum graphics_drivers { /* define graphics drivers */ DETECT, /* requests autodetection */ CGA, MCGA, EGA, EGA64, EGAMONO, IBM8514,/* 1 - 6 */ HERCMONO, ATT400, VGA, PC3270,/* 7 - 10 */ CURRENT_DRIVER = -1 };
enum graphics_modes {/* graphics modes for each driver */ CGAC0 = 0, /* 320x200 palette 0; 1 page*/ CGAC1 = 1, /* 320x200 palette 1; 1 page*/ CGAC2 = 2, /* 320x200 palette 2: 1 page*/ CGAC3 = 3, /* 320x200 palette 3; 1 page*/ CGAHI = 4, /* 640x200 1 page*/ MCGAC0 = 0, /* 320x200 palette 0; 1 page*/ MCGAC1 = 1, /* 320x200 palette 1; 1 page*/ MCGAC2 = 2, /* 320x200 palette 2; 1 page*/ MCGAC3 = 3, /* 320x200 palette 3; 1 page*/ MCGAMED = 4, /* 640x200 1 page*/ MCGAHI = 5, /* 640x480 1 page*/ EGALO = 0, /* 640x200 16 color 4 pages*/ EGAHI = 1, /* 640x350 16 color 2 pages*/ EGA64LO = 0, /* 640x200 16 color 1 page */ EGA64HI = 1, /* 640x350 4 color 1 page */ EGAMONOHI = 0, /* 640x350 64K on card, 1 page - 256K on card, 4 pages */ HERCMONOHI = 0, /* 720x348 2 pages */ ATT400C0 = 0, /* 320x200 palette 0; 1 page*/ ATT400C1 = 1, /* 320x200 palette 1; 1 page*/ ATT400C2 = 2, /* 320x200 palette 2; 1 page*/ ATT400C3 = 3, /* 320x200 palette 3; 1 page*/ ATT400MED = 4, /* 640x200 1 page*/ ATT400HI = 5, /* 640x400 1 page*/ VGALO = 0, /* 640x200 16 color 4 pages*/ VGAMED = 1, /* 640x350 16 color 2 pages*/ VGAHI = 2, /* 640x480 16 color 1 page */ PC3270HI = 0, /* 720x350 1 page*/ IBM8514LO = 0, /* 640x480 256 colors*/ IBM8514HI = 1 /*1024x768 256 colors*/ };
/* Colors for setpalette and setallpalette */
#if!defined(__COLORS) #define __COLORS
enum COLORS { BLACK, /* dark colors */ BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, /* light colors */ LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE }; #endif
enum CGA_COLORS { CGA_LIGHTGREEN = 1,/* Palette C0 Color Names*/ CGA_LIGHTRED = 2, CGA_YELLOW = 3,
CGA_LIGHTCYAN = 1,/* Palette C1 Color Names*/ CGA_LIGHTMAGENTA = 2, CGA_WHITE = 3,
CGA_GREEN = 1,/* Palette C2 Color Names*/ CGA_RED = 2, CGA_BROWN = 3,
CGA_CYAN = 1,/* Palette C3 Color Names*/ CGA_MAGENTA = 2, CGA_LIGHTGRAY = 3 };
enum EGA_COLORS { EGA_BLACK = 0, /* dark colors */ EGA_BLUE = 1, EGA_GREEN = 2, EGA_CYAN = 3, EGA_RED = 4, EGA_MAGENTA = 5, EGA_BROWN = 20, EGA_LIGHTGRAY = 7, EGA_DARKGRAY = 56, /* light colors */ EGA_LIGHTBLUE = 57, EGA_LIGHTGREEN = 58, EGA_LIGHTCYAN = 59, EGA_LIGHTRED = 60, EGA_LIGHTMAGENTA = 61, EGA_YELLOW = 62, EGA_WHITE = 63 };
enum line_styles {/* Line styles for get/setlinestyle */ SOLID_LINE = 0, DOTTED_LINE = 1, CENTER_LINE = 2, DASHED_LINE = 3, USERBIT_LINE = 4,/* User defined line style */ };
enum line_widths {/* Line widths for get/setlinestyle */ NORM_WIDTH = 1, THICK_WIDTH = 3, };
enum font_names { DEFAULT_FONT= 0,/* 8x8 bit mapped font */ TRIPLEX_FONT= 1,/* "Stroked" fonts */ SMALL_FONT= 2, SANS_SERIF_FONT = 3, GOTHIC_FONT= 4 };
#define HORIZ_DIR0/* left to right */ #define VERT_DIR1/* bottom to top */
#define USER_CHAR_SIZE0/* user-defined char size */
enum fill_patterns {/* Fill patterns for get/setfillstyle */ EMPTY_FILL,/* fills area in background color */ SOLID_FILL,/* fills area in solid fill color */ LINE_FILL,/* --- fill */ LTSLASH_FILL,/* /// fill */ SLASH_FILL,/* /// fill with thick lines */ BKSLASH_FILL,/* \\\ fill with thick lines */ LTBKSLASH_FILL, /* \\\ fill */ HATCH_FILL,/* light hatch fill */ XHATCH_FILL,/* heavy cross hatch fill */ INTERLEAVE_FILL,/* interleaving line fill */ WIDE_DOT_FILL,/* Widely spaced dot fill */ CLOSE_DOT_FILL, /* Closely spaced dot fill */ USER_FILL/* user defined fill */ };
enum putimage_ops {/* BitBlt operators for putimage */ COPY_PUT,/* MOV */ XOR_PUT,/* XOR */ OR_PUT, /* OR */ AND_PUT,/* AND */ NOT_PUT /* NOT */ };
enum text_just {/* Horizontal and vertical justification for settextjustify */ LEFT_TEXT= 0, CENTER_TEXT= 1, RIGHT_TEXT= 2,
BOTTOM_TEXT= 0, /* CENTER_TEXT= 1, already defined above */ TOP_TEXT= 2 };
#define MAXCOLORS 15
struct palettetype { unsigned char size; signed char colors[MAXCOLORS+1]; };
struct linesettingstype { int linestyle; unsigned upattern; int thickness; };
struct textsettingstype { int font; int direction; int charsize; int horiz; int vert; };
struct fillsettingstype { int pattern; int color; };
struct pointtype { int x, y; };
struct viewporttype { int left, top, right, bottom; int clip; };
struct arccoordstype { int x, y; int xstart, ystart, xend, yend; };
#ifdef __cplusplus extern "C" { #endif void far _Cdecl arc(int __x, int __y, int __stangle, int __endangle, int __radius); void far _Cdecl bar(int __left, int __top, int __right, int __bottom); void far _Cdecl bar3d(int __left, int __top, int __right, int __bottom, int __depth, int __topflag); void far _Cdecl circle(int __x, int __y, int __radius); void far _Cdecl cleardevice(void); void far _Cdecl clearviewport(void); void far _Cdecl closegraph(void); void far _Cdecl detectgraph(int far *__graphdriver,int far *__graphmode); void far _Cdecl drawpoly(int __numpoints, int far *__polypoints); void far _Cdecl ellipse(int __x, int __y, int __stangle, int __endangle, int __xradius, int __yradius); void far _Cdecl fillellipse( int __x, int __y, int __xradius, int __yradius ); void far _Cdecl fillpoly(int __numpoints, int far *__polypoints); void far _Cdecl floodfill(int __x, int __y, int __border); void far _Cdecl getarccoords(struct arccoordstype far *__arccoords); void far _Cdecl getaspectratio(int far *__xasp, int far *__yasp); int far _Cdecl getbkcolor(void); int far _Cdecl getcolor(void); struct palettetype far * far _Cdecl getdefaultpalette( void ); char * far _Cdecl getdrivername( void ); void far _Cdecl getfillpattern(char far *__pattern); void far _Cdecl getfillsettings(struct fillsettingstype far *__fillinfo); int far _Cdecl getgraphmode(void); void far _Cdecl getimage(int __left, int __top, int __right, int __bottom, void far *__bitmap); void far _Cdecl getlinesettings(struct linesettingstype far *__lineinfo); int far _Cdecl getmaxcolor(void); int far _Cdecl getmaxmode(void); int far _Cdecl getmaxx(void); int far _Cdecl getmaxy(void); char * far _Cdecl getmodename( int __mode_number ); void far _Cdecl getmoderange(int __graphdriver, int far *__lomode, int far *__himode); unsigned far _Cdecl getpixel(int __x, int __y); void far _Cdecl getpalette(struct palettetype far *__palette); int far _Cdecl getpalettesize( void ); void far _Cdecl gettextsettings(struct textsettingstype far *__texttypeinfo); void far _Cdecl getviewsettings(struct viewporttype far *__viewport); int far _Cdecl getx(void); int far _Cdecl gety(void); void far _Cdecl graphdefaults(void); char * far _Cdecl grapherrormsg(int __errorcode); void far _Cdecl _graphfreemem(void far *__ptr, unsigned __size); void far * far _Cdecl _graphgetmem(unsigned __size); int far _Cdecl graphresult(void); unsigned far _Cdecl imagesize(int __left, int __top, int __right, int __bottom); void far _Cdecl initgraph(int far *__graphdriver, int far *__graphmode, char far *__pathtodriver); int far _Cdecl installuserdriver( char far *__name, int huge (*detect)(void) ); int far _Cdecl installuserfont( char far *__name ); void far _Cdecl line(int __x1, int __y1, int __x2, int __y2); void far _Cdecl linerel(int __dx, int __dy); void far _Cdecl lineto(int __x, int __y); void far _Cdecl moverel(int __dx, int __dy); void far _Cdecl moveto(int __x, int __y); void far _Cdecl outtext(char far *__textstring); void far _Cdecl outtextxy(int __x, int __y, char far *__textstring); void far _Cdecl pieslice(int __x, int __y, int __stangle, int __endangle, int __radius); void far _Cdecl putimage(int __left, int __top, void far *__bitmap, int __op); void far _Cdecl putpixel(int __x, int __y, int __color); void far _Cdecl rectangle(int __left, int __top, int __right, int __bottom); void far _Cdecl restorecrtmode(void); void far _Cdecl sector( int __X, int __Y, int __StAngle, int __EndAngle, int __XRadius, int __YRadius ); void far _Cdecl setactivepage(int __page); void far _Cdecl setallpalette(struct palettetype far *__palette); void far _Cdecl setaspectratio( int __xasp, int __yasp ); void far _Cdecl setbkcolor(int __color); void far _Cdecl setcolor(int __color); void far _Cdecl setfillpattern(char far *__upattern, int __color); void far _Cdecl setfillstyle(int __pattern, int __color); unsigned far _Cdecl setgraphbufsize(unsigned __bufsize); void far _Cdecl setgraphmode(int __mode); void far _Cdecl setlinestyle(int __linestyle, unsigned __upattern, int __thickness); void far _Cdecl setpalette(int __colornum, int __color); void far _Cdecl setrgbpalette(int __colornum, int __red, int __green, int __blue); void far _Cdecl settextjustify(int __horiz, int __vert); void far _Cdecl settextstyle(int __font, int __direction, int __charsize); void far _Cdecl setusercharsize(int __multx, int __divx, int __multy, int __divy); void far _Cdecl setviewport(int __left, int __top, int __right, int __bottom, int __clip); void far _Cdecl setvisualpage(int __page); void far _Cdecl setwritemode( int __mode ); int far _Cdecl textheight(char far *__textstring); int far _Cdecl textwidth(char far *__textstring);
/***** graphics drivers *****/
int _Cdecl registerbgidriver(void (*driver)(void)); int far _Cdecl registerfarbgidriver(void far *__driver);
/* !! These "functions" are NOT user-callable !! */ /* !! They are there just so you can link in graphics drivers !! */
void _Cdecl CGA_driver(void); void _Cdecl EGAVGA_driver(void); void _Cdecl IBM8514_driver(void); void _Cdecl Herc_driver(void); void _Cdecl ATT_driver(void); void _Cdecl PC3270_driver(void);
extern int far _Cdecl CGA_driver_far[]; extern int far _Cdecl EGAVGA_driver_far[]; extern int far _Cdecl IBM8514_driver_far[]; extern int far _Cdecl Herc_driver_far[]; extern int far _Cdecl ATT_driver_far[]; extern int far _Cdecl PC3270_driver_far[];
/***** graphics fonts *****/
int _Cdecl registerbgifont(void (*font)(void)); int far _Cdecl registerfarbgifont(void far *__font);
/* !!These "functions" are NOT user-callable, !! */ /* !! they are there just so you can link in fonts !! */
void _Cdecltriplex_font(void); void _Cdecl small_font(void); void _Cdecl sansserif_font(void); void _Cdecl gothic_font(void);
extern int far _Cdecltriplex_font_far[]; extern int far _Cdecl small_font_far[]; extern int far _Cdecl sansserif_font_far[]; extern int far _Cdecl gothic_font_far[];
#ifdef __cplusplus } #endif
#endif
|
| | 2 answer | Add comment |
Wednesday, 10 February 2010
|
| Linker Error: undefined symbol _initgraph in .............. Filtrs16yo 12:18:32 |
| | Hi everyone ..i got a pretty serious problem .. i wrote a programm in a borland c++/c 3.1 (this prgoramm is using graphics), like this -->
# include <graphics.h> # include <conio.h> # include <stdio.h> # include <stdlib.h> void main(void) { int gdriver,gmode,errorcode,x; gdriver=DETECT; initgraph(&gdriver, &gmode,"c:\\BORLANDC\\BGL");
closegraph(); }
everything in the code are fine (i think) except, programm isn't working..it gives me 2 errors - =>Linker Error: undefined symbol _initgraph in module "".c and another error... =>Linker Error: undefined symbol _closegraph in module "".c ..maybe the borland c++/c compiler 3.1 is reason of these errors, i don't know...i just started in c++/c, so i hope somebody will give me any suggestions how to make this programm work..if you will ask me, why i need to use DOS GRAPHICS...i will say - it's my study work...to make programm in c++/c with graphics interface... thank you...
------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/EbFolB/TM --------------------------------------------------------------------~->
|
| | 3 answer | Add comment |
Tuesday, 12 January 2010
|
Topic awaiting moderation clothing 12:12:50 |
Saturday, 9 January 2010
|
Topic awaiting moderation 351100 03:03:14 |
Sunday, 15 November 2009
|
| Simple and fast hash function for strings Anand Buddhdev 01:24:57 |
| | Hi everyone,
This is my first post to this newsgroup, and I'm quite new to C programming, so please be gentle
I'm writing a small program in C that needs to take one or more words of input from the user, and then look these words up in a "dictionary" and inform the user whether all the words are good or not. For legal reasons, the dictionary cannot be in plain text, so I've been thinking about taking all the words in the dictionary and running them through a hash function, and using the resulting dictionary of hashes for lookups. I found a function posted by Daniel J Bernstein (djb hash) which looks suitable for this purpose. However, I'm not trained that well in mathematics, so I don't know how to tell if this function will produce any collisions for my word list. My word list consists of approximately 200,000 words, and the maximum length of a word is 15 characters. Does anyone have experience with this function (or anything similar), and if so, can you tell me if I'm going down the right path, or is this a non-starter?
The djb hash function is:
unsigned long hash(unsigned char *str) { В В unsigned long hash = 5381; В В int c; В В while (c = *str++) В В В В hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ В В return hash; }
-- Anand
|
| | 7 answers | Add comment |
Tuesday, 20 October 2009
|
Topic awaiting moderation topsellingnow 10:29:29 |
|
Topic awaiting moderation topsellingnow 10:27:54 |
|
| Download Turbo c++ version 3.0 Ourfp 07:25:59 |
| | Hi
I want to download Turbo c++ version 3.0 compiler plz give me the link to download it.
Ajay
|
| | 3 answer | Add comment |
|
Topic awaiting moderation topsellingnow 06:01:33 |
|
Topic awaiting moderation topsellingnow 05:59:23 |
|
Topic awaiting moderation topsellingnow 05:58:30 |
|
Topic awaiting moderation topsellingnow 05:56:38 |
Monday, 19 October 2009
|
| help me to draw a line in dev c++ Adjuto 05:59:44 |
| | I am finding troubles trying to draw a line in Dev C++.There are several examples over the internet about graphics libraries.But I find problems. I would be very glad if someone could help to draw a line in Dev C++. Please give me a example. Only a small piece of code. Please
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>.
Yahoo! Groups Sponsor
ADVERTISEMENT click here [http://us.ard.yahoo.com/SIG=1298m6ppb/M=298184.6018725.7038619.3001176/D=groups/S=1705006788:HM/EXP=1109855461/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075]
---------------------------------------------------------------------
Yahoo! Groups Links
* To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/ [http://groups.yahoo.com/group/c-prog/]
* To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Unsubscribe]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service [http://docs.yahoo.com/info/terms/].
|
| | 7 answers | Add comment |
Saturday, 3 October 2009
|
| [ROOT] Tgraph function for real time plotting? Andrew Sammut 03:52:40 |
| | Hi all I am running Version 4.00/06, 5 June 2004 on a Pentium 4, Windows XP platform. I require to use the Tgraph function or any alternative to plot a graph in real time; another program is running in the backround creating the data i require to plot and is being saved in a text file. I require root to access such a text file, perform numeric manipulation and plot the data on a graph. The problem i am having is to give the Tgraph function data items one at a time and not in array form. Is this possible? Thank you Andrew Sammut
|
| | 3 answer | Add comment |
Thursday, 10 September 2009
|
accept paypal burberry clothing kademiks clothing prada clothing burberry clothing versace t shirt v wholesale2wd 04:09:23 |
| | www.wholesale2wd.com
nike shoes wholesale jordan shoes dunk shoes max shoes af1 shoes blazer shoes D&G shoes ed hardy shoes dsquared shoes gucci shoes LV shoes timberland boots ugg boots,cheap AF tshirt ed hardy tshirt CA tshirt D&G tshirt armani tshirt polo tshirt versace tshirt ed hardy dress ca dress AF vest on sale,wholesale coach sandals burberry sandals fendi sandals D&G sandals lv sandals chanel sandals ugg sandals belle sandas versace sandals prada sandalsand so on.sell NY cap LV cap ed hardy cap CA cap set cap,hot sell ed hardy bikini polo bikini ca bikini AF bikini LV bikini Chanel bikini burberry bikini D&G bikini dior sunglasses chanel sunglasses ed hardy sunglasses CA sunglasses versace sunglasses D&G sunglasses gucci sunglasses and so on,cheap evisu jeans G-Star jeans ed hardy jeans coogi jeans gucci jeans versace jeans D&G jeans diesel jeans bape jeans dsquared jeans AF jeans wholesale,chanel sandals gucci sandals dior sandals burberry sandals juicy sandals D&G sandals fendi sandals D&G belts ed hardy belts versace belts CA belts chanel belts D&G bags burberry bags ed hardy bags chanel bags LV bags miumiu bags jimmy bags have new produce,discount gucci watch LV watch armani watch omerga watch rolex watch rado watch burberry watch KG watch IWC watch AP watch for sale
|
| | Add comment |
Sunday, 16 August 2009
|
c++ installer shobelissima 04:26:51 |
| | wa!!! could somebody help me where can i download a free turbo c++ installer. i tried to search a free installer but i ended up finding turbo explorer installer and the size of it is 300+ MB. isn't it that the turbo c++ is only 9MB - a size that is not greater than 20MB. please.. help me to find the installer.. please, or if you have an installer - could you please email it to prinsesang_diwata@yahoo.com ..tnx a lot in advance! |
| | 4 answer | Add comment |
Saturday, 18 July 2009
|
xochu uznat kak mojno connect to My... vvvvv 09:47:23 |
| | xochu uznat kak mojno connect to MySQL with C++ |
| | Add comment |
Friday, 19 June 2009
|
| "ERROR: GROUP DGROUP exceeds 64k" Ms 22:55:05 |
| | Hi All Have reall big problem...have project due out next week and now suddenly when i go to complile it get following compile error
"ERROR: GROUP DGROUP exceeds 64k"
Am really desperate to solve this as have tried everything!!! Anybody seen this before Thanks for any assistance Mike
|
| | 11 answers | Add comment |
Tuesday, 19 May 2009
|
| need railway reservation system software in VB +Oracle Ajay_iimt 05:55:10 |
| | hi all
i know this is c forum but still i am posting this bcoz its very urgent.i need railway reservation system software so if any one hav this in soft copy than plz mail me its very urgent or if anyone knows the link from where i can get the code of this than plz send me .
Its very urgent i need help from u all.
waiting for ur reply
ajay
------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/EbFolB/TM --------------------------------------------------------------------~->
|
| | 5 answers | Add comment |
Sunday, 18 January 2009
|
| 3D SERVICES Guest 09:16:27 |
| | - Our company 'studio FOKUSS' offering 3d services like 3d Animation, product modeling, product 3d animation, character animation, 3d Walkthroughs, visualisations, fly throughs, CGI, 3d Modeling, 3d Rendering, Outsource 3D Architectural Animation, 3d graphics Industry 3d modeling.
Want to get a quote - for our 3d services? Contact us at sandijs@3d-sketchup.com Or visit our website for details. www.3d-sketchup.com
|
| | Add comment |
|
|