亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xgeneral.c

?? 一個占星術算命游戲
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
** Astrolog (Version 4.00) File: xgeneral.c
**
** IMPORTANT NOTICE: the graphics database and chart display routines
** used in this program are Copyright (C) 1991-1993 by Walter D. Pullen
** (cruiser1@stein.u.washington.edu). Permission is granted to freely
** use and distribute these routines provided one doesn't sell,
** restrict, or profit from them in any way. Modification is allowed
** provided these notices remain with any altered or edited versions of
** the program.
**
** The main planetary calculation routines used in this program have
** been Copyrighted and the core of this program is basically a
** conversion to C of the routines created by James Neely as listed in
** Michael Erlewine's 'Manual of Computer Programming for Astrologers',
** available from Matrix Software. The copyright gives us permission to
** use the routines for personal use but not to sell them or profit from
** them in any way.
**
** The PostScript code within the core graphics routines are programmed
** and Copyright (C) 1992-1993 by Brian D. Willoughby
** (brianw@sounds.wa.com). Conditions are identical to those above.
**
** The extended accurate ephemeris databases and formulas are from the
** calculation routines in the program "Placalc" and are programmed and
** Copyright (C) 1989,1991,1993 by Astrodienst AG and Alois Treindl
** (alois@azur.ch). The use of that source code is subject to
** regulations made by Astrodienst Zurich, and the code is not in the
** public domain. This copyright notice must not be changed or removed
** by any user of this program.
**
** Initial programming 8/28,30, 9/10,13,16,20,23, 10/3,6,7, 11/7,10,21/1991.
** X Window graphics initially programmed 10/23-29/1991.
** PostScript graphics initially programmed 11/29-30/1992.
** Last code change made 12/31/1993.
*/

#include "astrolog.h"

#ifdef GRAPH

int xpen, ypen;


/*
******************************************************************************
** Bitmap File Routines.
******************************************************************************
*/

/* Write the bitmap array to a previously opened file in a format that   */
/* can be read in by the Unix X commands bitmap and xsetroot. The 'mode' */
/* parameter defines how much white space is put in the file.            */

void WriteXBitmap(data, name, mode)
FILE *data;
char *name, mode;
{
  int x, y, i, temp = 0;
  uint value;

  fprintf(data, "#define %s_width %d\n" , name, chartx);
  fprintf(data, "#define %s_height %d\n", name, charty);
  fprintf(data, "static %s %s_bits[] = {",
    mode != 'V' ? "char" : "short", name);
  for (y = 0; y < charty; y++) {
    x = 0;
    do {

      /* Process each row, eight columns at a time. */

      if (y + x > 0)
        fprintf(data, ",");
      if (temp == 0)
        fprintf(data, "\n%s",
          mode == 'N' ? "  " : (mode == 'C' ? " " : ""));
      value = 0;
      for (i = (mode != 'V' ? 7 : 15); i >= 0; i--)
        value = (value << 1) +
          (!(PGET(bm, x+i, y)^(xreverse*15))^xreverse && (x + i < chartx));
      if (mode == 'N')
        putc(' ', data);
      fprintf(data, "0x");
      if (mode == 'V')
        fprintf(data, "%c%c",
          INTTOHEX(value >> 12), INTTOHEX((value >> 8) & 15));
      fprintf(data, "%c%c",
        INTTOHEX((value >> 4) & 15), INTTOHEX(value & 15));
      temp++;

      /* Is it time to skip to the next line while writing the file yet? */

      if ((mode == 'N' && temp >= 12) ||
          (mode == 'C' && temp >= 15) ||
          (mode == 'V' && temp >= 11))
        temp = 0;
      x += (mode != 'V' ? 8 : 16);
    } while (x < chartx);
  }
  fprintf(data, "};\n");
}


/* Write the bitmap array to a previously opened file in a simple boolean    */
/* Ascii rectangle, one char per pixel, where '#' represents an off bit and  */
/* '-' an on bit. The output format is identical to the format generated by  */
/* the Unix bmtoa command, and it can be converted into a bitmap with atobm. */

void WriteAscii(data)
FILE *data;
{
  int x, y, i;

  for (y = 0; y < charty; y++) {
    for (x = 0; x < chartx; x++) {
      i = PGET(bm, x, y);
      if (xcolor)
        putc(INTTOHEX(i), data);
      else
        putc(i ? '-' : '#', data);
    }
    putc('\n', data);
  }
}


/* Write the bitmap array to a previously opened file in the bitmap format  */
/* used in Microsoft Windows for its .bmp extension files. This is a pretty */
/* efficient format, only requiring one bit per pixel and a small header.   */

void WriteBmp(data)
FILE *data;
{
  int x, y;
  dword value;

  /* BitmapFileHeader */
  PutByte('B'); PutByte('M');
  PutLong(14+40 + (xcolor ? 64 : 8) +
    (long)4*charty*((chartx-1 >> (xcolor ? 3 : 5))+1));
  PutWord(0); PutWord(0);
  PutLong(14+40 + (xcolor ? 64 : 8));
  /* BitmapInfo / BitmapInfoHeader */
  PutLong(40);
  PutLong(chartx); PutLong(charty);
  PutWord(1); PutWord(xcolor ? 4 : 1);
  PutLong(0 /*BI_RGB*/); PutLong(0);
  PutLong(0); PutLong(0);
  PutLong(0); PutLong(0);
  /* RgbQuad */
  if (xcolor)
    for (x = 0; x < 16; x++) {
      PutByte(RGBB(rgbbmp[x])); PutByte(RGBG(rgbbmp[x]));
      PutByte(RGBR(rgbbmp[x])); PutByte(0);
    }
  else {
    PutLong(0);
    PutByte(255); PutByte(255); PutByte(255); PutByte(0);
  }
  /* Data */
  for (y = charty-1; y >= 0; y--) {
    value = 0;
    for (x = 0; x < chartx; x++) {
      if ((x & (xcolor ? 7 : 31)) == 0 && x > 0) {
        PutLong(value);
        value = 0;
      }
      if (xcolor)
        value |= (dword)PGET(bm, x, y) << ((x & 7 ^ 1) << 2);
      else
        if (PGET(bm, x, y))
          value |= (dword)1 << (x & 31 ^ 7);
    }
    PutLong(value);
  }
}


/* Output the bitmap in memory to a file. This basically consists of just    */
/* calling some routine to actually write a bitmap to a file, although we    */
/* need to prompt the user for a filename if it wasn't specified beforehand. */

void WriteFile()
{
  char line[STRING];
  FILE *data;

#ifdef PS
  if (psfile) {
  	PSend();
    return;
  }
#endif
  if (outputfile == NULL && (metafile || (xbitmap && bitmapmode == 'B')))
    fprintf(stdout, "(It is recommended to specify an extension of '.%s'.)\n",
      xbitmap ? "bmp" : "wmf");
  loop {
    if (outputfile == NULL) {
      sprintf(line, "Enter name of file to write %s to",
        xbitmap ? "bitmap" : "metafile");
      InputString(line, line);
      outputfile = line;
    }
    data = fopen(outputfile, "wb");
    if (data != NULL)
      break;
    else {
      PrintWarning("Couldn't create output file.");
      outputfile = NULL;
    }
  }
  if (xbitmap) {
    if (bitmapmode == 'B')
      WriteBmp(data);
    else if (bitmapmode == 'A')
      WriteAscii(data);
    else
      WriteXBitmap(data, outputfile, bitmapmode);
  }
#ifdef META
  else
    WriteMeta(data);
#endif
  fclose(data);
}


/*
******************************************************************************
** PostScript File Routines.
******************************************************************************
*/

#ifdef PS

/* Global variables used by the PostScript generator. */

FILE *psdata;
int strokecount = 0, currentlinecap = 0, currentdash = 0, currentfont = 0;
real currentlinewidth = 1.0;

/* Table of PostScript header alias lines used by the program. */

char PSfunctions[] =
"/languagelevel where{pop languagelevel}{1}ifelse\
 2 lt{\n\
/sf{exch findfont exch\
 dup type/arraytype eq{makefont}{scalefont}ifelse setfont}bind def\n\
/rf{gsave newpath\n\
4 -2 roll moveto\
 dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto closepath\n\
fill grestore}bind def\n\
/rc{newpath\n\
4 -2 roll moveto\
 dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto closepath\n\
clip newpath}bind def\n\
}{/sf/selectfont load def/rf/rectfill load def\
/rc/rectclip load def}ifelse\n\
/center{0 begin gsave dup 4 2 roll\
 translate newpath 0 0 moveto\
 false charpath flattenpath pathbbox\
 /URy exch def/URx exch def/LLy exch def/LLx exch def\
 URx LLx sub 0.5 mul LLx add neg URy LLy sub 0.5 mul LLy add neg\
 0 0 moveto rmoveto\
 show grestore end}bind def\n\
/center load 0 4 dict put\n\
/c{setrgbcolor}bind def\n\
/d{moveto 0 0 rlineto}bind def\n\
/l{4 2 roll moveto lineto}bind def\n\
/t{lineto}bind def\n\
/el{newpath matrix currentmatrix 5 1 roll translate scale\
 0 0 1 0 360 arc setmatrix stroke}bind def\n";


/* Write a command to flush the PostScript buffer. */

void PSforcestroke()
{
  if (strokecount > 0) {            /* render any existing path */
    fprintf(psdata, "stroke\n");
    strokecount = 0;
    xpen = -1;                      /* Invalidate PolyLine cache */
  }
}


/* Indicate that a certain number of PostScript commands have been done. */

void PSstroke(n)
int n;
{
  strokecount += n;
  if (strokecount > 5000)    /* Whenever we reach a certain limit, flush. */
    PSforcestroke();
}


/* Set the type of line end to be used by PostScript commands. If linecap */
/* is true, then the line ends are rounded, otherwise they are squared.   */

void PSlinecap(linecap)
int linecap;
{
  if (linecap != currentlinecap) {
    PSforcestroke();
    fprintf(psdata, "%d setlinecap\n", linecap);
    currentlinecap = linecap;
  }
}


/* Set the dash length to be used by PostScript line commands. */

void PSdash(dashoff)
int dashoff;
{
  if (dashoff != currentdash) {
    PSforcestroke();
    if (dashoff)
      fprintf(psdata, "[%d %d", PSMUL, dashoff * PSMUL);
    else
      fprintf(psdata, "[");
    fprintf(psdata, "]0 setdash\n");
    currentdash = dashoff;
  }
}


/* Set a linewidth size to be used by PostScript figure primitive commands. */

void PSlinewidth(linewidth)
int linewidth;
{
  real oldlinewidth = currentlinewidth;

  if (linewidth != currentlinewidth) {
    PSforcestroke();
    fprintf(psdata, "%d setlinewidth\n", linewidth);
    currentlinewidth = linewidth;
  }
}


/* Set a system font and size to be used by PostScript text commands. */

void PSfont(psfont)
int psfont;
{
  int temp;

  if (psfont != currentfont && xfont) {
    if (psfont <= 2) {
      temp = psfont == 1 ? 32*PSMUL : 23*PSMUL;
    	fprintf(psdata, "/Astro[%d 0 0 -%d 0 0]sf\n", temp, temp);
    } else if (psfont == 3) {
      temp = 26*PSMUL;
      fprintf(psdata, "/Times-Roman[%d 0 0 -%d 0 0]sf\n", temp, temp);
    } else {
      temp = 10*PSMUL;
      fprintf(psdata, "/Courier[%d 0 0 -%d 0 0]sf\n", temp, temp);
    }
    currentfont = psfont;
  }
}


/* Prompt the user for the name of a file to write the PostScript file to */
/* (if not already specified), open it, and write out file header info.   */

void PSbegin()
{
  char line[STRING];

  if (outputfile == NULL && epsfile)
    fprintf(stdout,
      "(It is recommended to specify an extension of '.eps'.)\n");
  loop {
    if (outputfile == NULL) {
      sprintf(line, "Enter name of file to write PostScript to");
      InputString(line, line);
      outputfile = line;
    }
    psdata = fopen(outputfile, "w");
    if (psdata != NULL)
      break;
    else {
      PrintWarning("Couldn't create output file.");
      outputfile = NULL;
    }
  }
  fprintf(psdata, "%%!PS-Adobe-2.0");
  if (epsfile)
    fprintf(psdata, " EPSF-2.0");
  fprintf(psdata, "\n%%%%Title: %s\n", outputfile);
  fprintf(psdata, "%%%%Creator: %s %s\n", appname, VERSION);
  fprintf(psdata, "%%%%CreationDate: %s\n", DATE);
  if (epsfile) {
    fprintf(psdata, "%%%%BoundingBox: 0 0 %d %d\n", chartx, charty);
    fprintf(psdata, "%%%%EndComments\n");
    fprintf(psdata, "%%%%BeginSetup\n");
    fprintf(psdata, PSfunctions, 6 * PSMUL, 6 * PSMUL);
    fprintf(psdata, "%%%%EndSetup\n");
    fprintf(psdata, "0 0 %d %d rc\n", chartx, charty);
  } else {
    fprintf(psdata, "%%%%Pages: 1 1\n");
    fprintf(psdata, "%%%%DocumentFonts: (atend)\n");
    fprintf(psdata, "%%%%BoundingBox: 9 9 603 783\n");    /* 8.5" x 11" */
    fprintf(psdata, "%%%%EndComments\n");
    fprintf(psdata, "%%%%BeginProcSet: common\n");
    fprintf(psdata, PSfunctions, 6 * PSMUL, 6 * PSMUL);
    fprintf(psdata, "%%%%EndProcSet\n");
    fprintf(psdata, "%%%%Page: 1 1\n");
  }
  PSfont(2);
  fprintf(psdata, "gsave\n");
  PSlinewidth(metawid/2);
  xpen = -1;
}


/* Write out trailing information to the PostScript file and close it. */

void PSend()
{
  PSforcestroke();
  if (epsfile)
    fprintf(psdata, "%%%%EOF\n");
  else {
    fprintf(psdata, "showpage\n");
    fprintf(psdata, "%%%%PageTrailer\n");
    fprintf(psdata, "%%%%Trailer\n");
    fprintf(psdata, "%%%%DocumentFonts: Times-Roman\n");
    if (xfont) {
      fprintf(psdata, "%%%%+ Courier\n");
      fprintf(psdata, "%%%%+ Astro\n");
    }
  }
  fclose(psdata);
}
#endif /* PS */


/*
******************************************************************************
** Metafile Routines.
******************************************************************************
*/

#ifdef META

/* Global variables used by the metafile generator. */

colpal metalinedes, metalineact = -1,    /* Desired and actual line color. */
  metafilldes,      metafillact = -1,    /* Desired and actual fill color. */
  metafontdes = -1, metafontact = -1,    /* Desired and actual text font.  */
  metatxtcdes = -1, metatxtcact = -1,    /* Desired and actual text color. */
  metatxtades = -1, metatxtaact = -1;    /* Desired/actual text alignment. */

/* Macros to output the various metafile commands we use. */

#define MetaRecord(S, R) MetaLong((long)(S)); MetaWord(R)
#define MetaSelectObject(O) MetaRecord(4, 0x12D); MetaWord(O)
#define MetaDeleteObject(O) MetaRecord(4, 0x1F0); MetaWord(O)
#define MetaSaveDc() MetaRecord(3, 0x01E)
#define MetaRestoreDc() MetaRecord(4, 0x127); MetaWord(-1)
#define MetaWindowOrg(X, Y) MetaRecord(5, 0x20B); MetaWord(Y); MetaWord(X)
#define MetaWindowExt(X, Y) MetaRecord(5, 0x20C); MetaWord(Y); MetaWord(X)
#define MetaCreatePen(S, W, C) MetaRecord(8, 0x2FA); MetaWord(S); \
  MetaWord(W); MetaWord(W); MetaLong(C)
#define MetaCreateBrush(S, C) MetaRecord(7, 0x2FC); \
  MetaWord(S); MetaLong(C); MetaWord(0 /* Not used */);
#define MetaCreateFont(S, X, Y, C) MetaRecord(12+(S), 0x2FB); MetaWord(Y); \
  MetaWord(X); MetaWord(0 /* Angle */); MetaWord(0 /* Not used */); \
  MetaWord(400 /* Normal Weight */); MetaWord(0 /* Italic, Underline */); \

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产视频在线| 成人h精品动漫一区二区三区| 一区二区三区 在线观看视频| 国产精品视频免费看| 中文字幕不卡在线| 国产欧美日韩另类视频免费观看| 久久久久久久久99精品| 久久久午夜精品| 国产色爱av资源综合区| 欧美激情一区二区三区全黄| 欧美高清在线一区二区| 中文字幕视频一区| 亚洲免费观看高清完整版在线| 亚洲乱码国产乱码精品精的特点| 一区二区三区在线视频免费| 亚洲444eee在线观看| 免费观看30秒视频久久| 精品一区二区三区免费观看| 国产又粗又猛又爽又黄91精品| 国产乱淫av一区二区三区 | 99精品视频在线观看免费| proumb性欧美在线观看| 在线看日本不卡| 欧美一区二区三区免费| 久久女同性恋中文字幕| 国产精品短视频| 亚洲电影视频在线| 极品少妇一区二区三区精品视频| 国产福利精品导航| 91在线视频在线| 欧美日韩国产123区| www激情久久| 一区二区三区小说| 卡一卡二国产精品| 成人国产亚洲欧美成人综合网| 色视频一区二区| 日韩欧美国产小视频| 国产精品国产自产拍在线| 亚洲不卡在线观看| 国产成人自拍高清视频在线免费播放| aaa欧美日韩| 91精品国产91综合久久蜜臀| 中文成人av在线| 丝袜诱惑制服诱惑色一区在线观看| 极品美女销魂一区二区三区| 色综合久久综合| 精品国产三级电影在线观看| 亚洲色图制服丝袜| 久久成人免费网站| 色婷婷综合在线| 久久先锋影音av鲁色资源网| 亚洲最大成人综合| 国产一区二区美女| 欧美美女直播网站| 国产精品久久久久桃色tv| 强制捆绑调教一区二区| 91在线精品一区二区| 精品日韩一区二区| 亚洲影院久久精品| 国产成人无遮挡在线视频| 欧美日韩国产精选| 亚洲日本在线a| 国产精品一区二区在线看| 4438x成人网最大色成网站| 亚洲欧美在线另类| 国产精品资源网站| 欧美一级理论性理论a| 亚洲免费观看在线视频| 韩国视频一区二区| 91精品久久久久久久99蜜桃| 亚洲日本一区二区三区| 国产成人av在线影院| 欧美一级久久久| 亚洲国产精品久久人人爱蜜臀| 成人一区二区三区在线观看| 日韩你懂的在线观看| 亚洲高清免费视频| 91久久精品网| 国产精品成人免费| 国产成人一级电影| 精品国产成人系列| 人人精品人人爱| 欧美美女视频在线观看| 亚洲一级电影视频| 色综合久久久久综合99| 综合久久一区二区三区| 福利电影一区二区| 国产午夜久久久久| 国产美女一区二区三区| 26uuu色噜噜精品一区| 蜜臀va亚洲va欧美va天堂| 欧美高清视频不卡网| 亚洲成人自拍网| 精品视频色一区| 性做久久久久久| 欧美日韩精品一区二区在线播放 | 看电影不卡的网站| 91精品国产一区二区三区蜜臀| 亚洲一区二区精品3399| 欧美性一级生活| 亚洲宅男天堂在线观看无病毒| 91麻豆成人久久精品二区三区| 国产精品伦理在线| 99久久伊人精品| 亚洲视频一二三区| 欧洲中文字幕精品| 亚洲午夜精品17c| 制服丝袜亚洲精品中文字幕| 日韩av电影天堂| 欧美mv日韩mv国产网站| 国产精品资源在线看| 国产精品福利av| 色综合久久中文字幕综合网 | 色婷婷亚洲综合| 夜夜嗨av一区二区三区中文字幕| 在线视频你懂得一区二区三区| 亚洲欧美激情小说另类| 欧美日韩黄视频| 免费高清不卡av| 亚洲精品在线电影| 国产成人av一区二区三区在线观看| 国产精品无码永久免费888| 91视频你懂的| 婷婷一区二区三区| 精品免费国产二区三区| 成人黄页毛片网站| 亚洲在线免费播放| 日韩一区二区三区四区五区六区| 精品午夜久久福利影院| 日本一区二区三区免费乱视频| 91影院在线免费观看| 视频在线观看91| 国产亚洲美州欧州综合国| 色香蕉成人二区免费| 日本成人在线看| 国产精品久久久久久亚洲毛片| 欧美色国产精品| 国模大尺度一区二区三区| 中文字幕亚洲精品在线观看| 8v天堂国产在线一区二区| 国产精品99久久久久| 亚洲一区二区在线视频| 精品国内片67194| 色婷婷香蕉在线一区二区| 久久99精品国产.久久久久| 国产精品国产三级国产aⅴ中文 | 色综合久久综合中文综合网| 天天射综合影视| 亚洲国产精品黑人久久久| 欧美撒尿777hd撒尿| 国产在线看一区| 亚洲午夜在线观看视频在线| 欧美精品一区二区三区很污很色的| 99v久久综合狠狠综合久久| 蜜桃一区二区三区四区| 亚洲女女做受ⅹxx高潮| 精品国产乱码久久久久久1区2区| aaa欧美大片| 精品一区二区三区在线观看| 亚洲免费在线看| 日本一区二区三区久久久久久久久不| 欧美日韩你懂得| 成人黄色小视频| 久久综合综合久久综合| 亚洲国产精品一区二区www| 中文字幕精品一区二区三区精品| 欧美日韩国产高清一区二区| 99国产精品久| 国产成人一区在线| 精品一区二区免费| 亚洲1区2区3区视频| **欧美大码日韩| 国产免费久久精品| 日韩欧美综合在线| 欧美精品tushy高清| 91麻豆精品在线观看| 粉嫩av一区二区三区在线播放 | 菠萝蜜视频在线观看一区| 久久精品国产久精国产| 天天免费综合色| 一区二区三区日本| 1000部国产精品成人观看| 中文字幕欧美激情| 国产色产综合产在线视频| 精品美女在线观看| 欧美一区二区三区在线视频 | 国产精品国产精品国产专区不蜜| 日韩欧美国产三级电影视频| 欧美日韩小视频| 欧美色欧美亚洲另类二区| 91麻豆精品在线观看| 97精品久久久午夜一区二区三区| 国产成人高清视频| 国产91对白在线观看九色| 国产在线播放一区三区四| 久久成人免费电影| 久久99精品国产麻豆不卡| 久久99久久99精品免视看婷婷| 免费看欧美美女黄的网站| 日本欧美在线看|