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

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

?? standard.shar

?? c語言開發方面的經典問題,包括源代碼.c語言開發所要注意的問題,以及在嵌入式等各方面的應用
?? SHAR
?? 第 1 頁 / 共 5 頁
字號:
X * object of the type to which pointer-type points and returnsX * a pointer to the newly allocated pointer.  Note thatX * "New" is different from the "new" operator used in C++;X * the former takes a pointer type and the latter takes theX * target type.X */XX#define New(type) ((type) GetBlock(sizeof *((type) NULL)))XX/*X * Macro: NewArrayX * Usage: p = NewArray(n, element-type);X * -------------------------------------X * NewArray allocates enough space to hold an array of nX * values of the specified element type.X */XX#define NewArray(n, type) ((type *) GetBlock((n) * sizeof (type)))XX/* Section 3 -- Basic error handling */XX/*X * Function: ErrorX * Usage: Error(msg, ...)X * ----------------------X * Error generates an error string, expanding % constructionsX * appearing in the error message string just as printf does.X * If an error handler exception has been introduced (see theX * "exception.h" facility), the ErrorException exception isX * raised with the expanded error string as argument.  IfX * there is no ErrorException defined, the program exitsX * with a status code indicating failure (as given by theX * constant ErrorExitStatus).  The length of the errorX * message string following expansion must not exceedX * MaxErrorMessage, and it is the client's responsibilityX * to ensure this.X */XXvoid Error(string msg, ...);XX/* Section 4 -- The repeat pseudo-statement */XX/*X * Statement form: repeat { ... }X * ------------------------------X * Some instructors who have taught CS1 using this libraryX * have found that usingX *X *     while (TRUE)X *X * to initiate a loop with an interior exit is confusing toX * students, particularly when it comes at the beginning ofX * the course.  This macro defines "repeat" as an infiniteX * loop construct for instructors who find it easier toX * explain, although it is not used in the text.   SimilarX * macro definitions are common in industry.X */XX#define repeat for (;;)XX#endifEND_OF_FILEif test 6232 -ne `wc -c <'cslib/genlib.h'`; then    echo shar: \"'cslib/genlib.h'\" unpacked with wrong size!fi# end of 'cslib/genlib.h'fiif test -f 'cslib/graphics.c' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/graphics.c'\"elseecho shar: Extracting \"'cslib/graphics.c'\" \(4864 characters\)sed "s/^X//" >'cslib/graphics.c' <<'END_OF_FILE'X/*X * File: graphics.cX * Version: 1.0X * Last modified on Thu Sep 16 09:34:19 1993 by erobertsX * -----------------------------------------------------X * This file provides a fully standard implementation of theX * graphics.h interface that generates a PostScript file,X * suitable for printing.  None of the operations in theX * extended graphics interface are supported.  PostScript isX * a registered trademark of Adobe Systems Incorporated.X */XX/*X * General implementation notesX * ----------------------------X * This implementation of the graphics.h interface does notX * actually do any display but instead writes a PostScriptX * file containing commands that would generate the picture.X * The advantage of this implementation is portability, sinceX * it contains no code that depends on graphics primitivesX * for a particular platform.X *X * The code for this implementation is for the most partX * straightforward, because all of the graphics primitivesX * have simple PostScript equivalents.  The only hard partX * is making sure that the end of the file is correct whenX * the file is closed, usually via the exit call.  To printX * the page, the showpage command must occur at the end ofX * the file, but the graphics package does not get controlX * at that point.  To avoid the problem, each call to thisX * package writes a legal trailer to the file.  Thus, theX * invariant after each call to any of these functions isX * that the PostScript file is complete.  Before writingX * new data, these functions back up the file pointer overX * the old trailer and begin rewriting from that point.X */XX#include <stdio.h>X#include <math.h>XX#include "genlib.h"X#include "graphics.h"XX/*X * Constants: WindowHeight, WindowWidthX * ------------------------------------X * These constants are the values returned by GetWindowHeightX * and GetWindowWidth.  The assumption here is that output isX * being directed to an 8.5 x 11 page.X */XX#define WindowHeight 11.0X#define WindowWidth   8.5XX/*X * Constant: PSFileNameX * --------------------X * The name of the PostScript output file.X */XX#define PSFileName "graphics.ps"XX/*X * Private variablesX * -----------------X * initialized    Set to TRUE when InitGraphics is called.X * psfile         The file stream used for PostScript.X * cx, cy         The current x, y positions.X * nextWrite      The file index for the next PostScriptX *                command (see the general notes above).X */XXstatic bool initialized = FALSE;XXstatic FILE *psfile;XXstatic double cx, cy;XXstatic long nextWrite;XX/* Private function prototypes */XXstatic void InitCheck(void);Xstatic void WritePostScriptHeader(void);Xstatic void WritePostScriptTrailer(void);Xstatic void ResetFilePointer(void);Xstatic double Pts(double inches);Xstatic double Radians(double degrees);XX/* Public functions */XXvoid InitGraphics(void)X{X    if (initialized) fclose(psfile);X    psfile = fopen(PSFileName, "w");X    WritePostScriptHeader();X    WritePostScriptTrailer();X    cx = cy = 0;X    initialized = TRUE;X}XXvoid MovePen(double x, double y)X{X    InitCheck();X    cx = x;X    cy = y;X}XXvoid DrawLine(double dx, double dy)X{X    InitCheck();X    ResetFilePointer();X    fprintf(psfile, "newpath %g %g moveto", Pts(cx), Pts(cy));X    fprintf(psfile, " %g %g rlineto stroke\n", Pts(dx), Pts(dy));X    cx += dx;X    cy += dy;X    WritePostScriptTrailer();X}XXvoid DrawArc(double r, double start, double sweep)X{X    double x, y;XX    InitCheck();X    x = cx + r * cos(Radians(start + 180));X    y = cy + r * sin(Radians(start + 180));X    ResetFilePointer();X    fprintf(psfile, "newpath %g %g %g", Pts(x), Pts(y), Pts(r));X    fprintf(psfile, " %g %g", start, start + sweep);X    fprintf(psfile, " %s stroke\n", (sweep < 0) ? "arcn" : "arc");X    WritePostScriptTrailer();X    cx = x + r * cos(Radians(start + sweep));X    cy = y + r * sin(Radians(start + sweep));X}XXdouble GetWindowWidth(void)X{X    InitCheck();X    return (WindowWidth);X}XXdouble GetWindowHeight(void)X{X    InitCheck();X    return (WindowHeight);X}XXdouble GetCurrentX(void)X{X    InitCheck();X    return (cx);X}XXdouble GetCurrentY(void)X{X    InitCheck();X    return (cy);X}XX/* Private functions */XXstatic void InitCheck(void)X{X    if (!initialized) Error("InitGraphics has not been called");X}XXstatic void WritePostScriptHeader(void)X{X    fprintf(psfile, "%%!PS-Adobe-1.0\n");X    fprintf(psfile, "%%%%Title: graphics window\n");X    fprintf(psfile, "%%%%Pages: 1\n");X    fprintf(psfile, "%%%%EndComments\n");X}XXstatic void WritePostScriptTrailer(void)X{X    nextWrite = ftell(psfile);X    fprintf(psfile, "showpage\n");X}XXstatic void ResetFilePointer(void)X{X    fseek(psfile, nextWrite, 0);X}XXstatic double Pts(double inches)X{X    return (72 * inches);X}XXstatic double Radians(double degrees)X{X    return (degrees / 180 * 3.1415926535);X}END_OF_FILEif test 4864 -ne `wc -c <'cslib/graphics.c'`; then    echo shar: \"'cslib/graphics.c'\" unpacked with wrong size!fi# end of 'cslib/graphics.c'fiif test -f 'cslib/graphics.h' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/graphics.h'\"elseecho shar: Extracting \"'cslib/graphics.h'\" \(4805 characters\)sed "s/^X//" >'cslib/graphics.h' <<'END_OF_FILE'X/*X * File: graphics.hX * Version: 1.0X * Last modified on Mon Jun  6 11:03:27 1994 by erobertsX * -----------------------------------------------------X * This interface provides access to a simple library ofX * functions that make it possible to draw lines and arcsX * on the screen.  This interface presents a portableX * abstraction that can be used with a variety of windowX * systems implemented on different hardware platforms.X */XX#ifndef _graphics_hX#define _graphics_hXX/*X * OverviewX * --------X * This library provides several functions for drawing linesX * and circular arcs in a region of the screen that isX * defined as the "graphics window."  Once drawn, theseX * lines and arcs stay in their position, which means thatX * the package can only be used for static pictures and notX * for animation.X *X * Individual points within the window are specified byX * giving their x and y coordinates.  These coordinates areX * real numbers measured in inches, with the origin in theX * lower left corner, as it is in traditional mathematics.X *X * The calls available in the package are listed below.  MoreX * complete descriptions are included with each functionX * description.X *X *   InitGraphics();X *   MovePen(x, y);X *   DrawLine(dx, dy);X *   DrawArc(r, start, sweep);X *   width = GetWindowWidth();X *   height = GetWindowHeight();X *   x = GetCurrentX();X *   y = GetCurrentY();X */XX/*X * Function: InitGraphicsX * Usage: InitGraphics();X * ----------------------X * This procedure creates the graphics window on the screen.X * The call to InitGraphics must precede any calls to otherX * functions in this package and must also precede any printfX * output.  In most cases, the InitGraphics call is the firstX * statement in the function main.X */XXvoid InitGraphics(void);XX/*X * Function: MovePenX * Usage: MovePen(x, y);X * ---------------------X * This procedure moves the current point to the positionX * (x, y), without drawing a line.  The model is that ofX * the pen being lifted off the graphics window surface andX * then moved to its new position.X */XXvoid MovePen(double x, double y);XX/*X * Function: DrawLineX * Usage: DrawLine(dx, dy);X * ------------------------X * This procedure draws a line extending from the currentX * point by moving the pen dx inches in the x directionX * and dy inches in the y direction.  The final positionX * becomes the new current point.X */XXvoid DrawLine(double dx, double dy);XX/*X * Function: DrawArcX * Usage: DrawArc(r, start, sweep);X * --------------------------------X * This procedure draws a circular arc, which always beginsX * at the current point.  The arc itself has radius r, andX * starts at the angle specified by the parameter start,X * relative to the center of the circle.  This angle isX * measured in degrees counterclockwise from the 3 o'clockX * position along the x-axis, as in traditional mathematics.X * For example, if start is 0, the arc begins at the 3 o'clockX * position; if start is 90, the arc begins at the 12 o'clockX * position; and so on.  The fraction of the circle drawn isX * specified by the parameter sweep, which is also measured inX * degrees.  If sweep is 360, DrawArc draws a complete circle;X * if sweep is 90, it draws a quarter of a circle.  If the valueX * of sweep is positive, the arc is drawn counterclockwise fromX * the current point.  If sweep is negative, the arc is drawnX * clockwise from the current point.  The current point at theX * end of the DrawArc operation is the final position of the penX * along the arc.X *X * Examples:X *   DrawArc(r, 0, 360)    Draws a circle to the left of theX *                         current point.X *   DrawArc(r, 90, 180)   Draws the left half of a semicircleX *                         starting from the 12 o'clock position.X *   DrawArc(r, 0, 90)     Draws a quarter circle from the 3X *                         o'clock to the 12 o'clock position.X *   DrawArc(r, 0, -90)    Draws a quarter circle from the 3X *                         o'clock to the 6 o'clock position.X *   DrawArc(r, -90, -90)  Draws a quarter circle from the 6X *                         o'clock to the 9 o'clock position.X */XXvoid DrawArc(double r, double start, double sweep);XX/*X * Functions: GetWindowWidth, GetWindowHeightX * Usage: width = GetWindowWidth();X *        height = GetWindowHeight();X * ------------------------------------------X * These functions return the width and height of the graphicsX * window, in inches.X */XXdouble GetWindowWidth(void);Xdouble GetWindowHeight(void);XX/*X * Functions: GetCurrentX, GetCurrentYX * Usage: x = GetCurrentX();X *        y = GetCurrentY();X * -----------------------------------X * These functions return the current x and y positions.X */XXdouble GetCurrentX(void);Xdouble GetCurrentY(void);XX#endifEND_OF_FILEif test 4805 -ne `wc -c <'cslib/graphics.h'`; then    echo shar: \"'cslib/graphics.h'\" unpacked with wrong size!fi# end of 'cslib/graphics.h'fiif test -f 'cslib/random.c' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/random.c'\"elseecho shar: Extracting \"'cslib/random.c'\" \(1718 characters\)sed "s/^X//" >'cslib/random.c' <<'END_OF_FILE'X/*X * File: random.cX * Version: 1.0X * Last modified on Mon Sep 13 10:42:45 1993 by erobertsX * -----------------------------------------------------X * This file implements the random.h interface.X */XX#include <stdio.h>X#include <stdlib.h>X#include <time.h>XX#include "genlib.h"X#include "random.h"XX/*X * Function: RandomizeX * -------------------X * This function operates by setting the random numberX * seed to the current time.  The srand function is

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
3atv一区二区三区| 欧美日本乱大交xxxxx| 九九九精品视频| 天天av天天翘天天综合网| 一区二区三区在线免费视频| 国产精品免费视频观看| 中文字幕av不卡| 国产女主播一区| 综合在线观看色| 亚洲女同ⅹxx女同tv| 亚洲综合在线视频| 亚瑟在线精品视频| 久久精品999| 国产成人综合亚洲网站| 成人免费av网站| 97精品电影院| 欧美日韩成人一区二区| 精品国内二区三区| 国产精品黄色在线观看| 一区二区三区 在线观看视频| 亚洲精品视频免费观看| 一区二区三区91| 久久精品国产精品亚洲红杏| 国产99久久久国产精品潘金| av不卡免费在线观看| 欧美私人免费视频| 久久人人97超碰com| 一色桃子久久精品亚洲| 亚洲va国产天堂va久久en| 老司机精品视频线观看86| fc2成人免费人成在线观看播放| 在线观看日韩一区| 精品精品欲导航| 中文字幕欧美一| 久久国产视频网| thepron国产精品| 日韩一卡二卡三卡四卡| 中文字幕精品一区二区三区精品| 日韩美女视频一区二区 | 一区二区三区高清| 狠狠色丁香婷婷综合| 色视频一区二区| 精品国产乱码久久| 亚洲国产人成综合网站| 国产一区二区中文字幕| 欧美综合久久久| 国产精品素人一区二区| 日韩国产欧美三级| 色素色在线综合| 中文字幕成人av| 久久精品国产99久久6| 色欧美乱欧美15图片| 久久精品人人爽人人爽| 午夜影院在线观看欧美| 94-欧美-setu| 久久久久久久综合色一本| 亚欧色一区w666天堂| 91片在线免费观看| 欧美—级在线免费片| 精品无人码麻豆乱码1区2区 | 亚洲国产综合在线| 成人听书哪个软件好| 精品第一国产综合精品aⅴ| 亚洲成va人在线观看| 在线一区二区观看| 亚洲视频免费看| aaa欧美色吧激情视频| 中文字幕第一区第二区| 国产在线观看免费一区| 欧美不卡视频一区| 美女视频网站久久| 日韩一二在线观看| 日韩va亚洲va欧美va久久| 欧美日韩久久一区| 亚洲大片精品永久免费| 欧美三级乱人伦电影| 亚洲成在人线在线播放| 欧美精品日韩综合在线| 日韩综合一区二区| 欧美一区二区国产| 久久超碰97人人做人人爱| 亚洲精品一区二区在线观看| 久久精品72免费观看| 精品99久久久久久| 国产成a人亚洲| 综合在线观看色| 欧美日韩专区在线| 日韩1区2区日韩1区2区| 精品国产伦一区二区三区免费| 精品一区二区三区在线播放视频| 精品国产伦一区二区三区观看方式| 国产乱人伦偷精品视频免下载 | 99精品国产一区二区三区不卡 | 色综合天天综合在线视频| 亚洲日本中文字幕区| 欧美性生活大片视频| 麻豆免费看一区二区三区| 国产日韩精品一区二区三区在线| 成人黄页在线观看| 亚洲bt欧美bt精品| 26uuu亚洲综合色| 99久久伊人精品| 亚洲成av人片一区二区| 欧美大片在线观看一区| 国产激情偷乱视频一区二区三区| 亚洲三级在线免费| 日韩欧美电影在线| 91免费国产视频网站| 亚洲成人免费在线| 久久久久久夜精品精品免费| 99久久99久久免费精品蜜臀| 亚洲国产欧美另类丝袜| 精品美女一区二区| 欧美午夜精品久久久久久孕妇| 久久爱www久久做| 亚洲免费观看高清| 精品国产3级a| 欧美日韩精品一区二区三区四区| 狠狠久久亚洲欧美| 日韩精品视频网| 国产精品二区一区二区aⅴ污介绍| 欧美喷水一区二区| av电影在线不卡| 国内精品嫩模私拍在线| 亚洲成人一区在线| 亚洲精品视频在线| 国产偷v国产偷v亚洲高清| 欧美日韩aaaaaa| 91视频一区二区三区| 国内一区二区在线| 日韩**一区毛片| 亚洲网友自拍偷拍| 综合欧美一区二区三区| 国产视频在线观看一区二区三区 | 国产亚洲短视频| 91精品国产综合久久久蜜臀图片| 成人成人成人在线视频| 久久99精品国产| 青青草91视频| 性久久久久久久| 亚洲成人精品在线观看| 亚洲免费观看高清完整版在线观看 | 欧美日韩另类国产亚洲欧美一级| caoporen国产精品视频| 国产精品一区二区黑丝| 狠狠色狠狠色综合系列| 九一九一国产精品| 日本视频一区二区三区| 日韩精品久久久久久| 亚洲一二三四区| 一级日本不卡的影视| 亚洲欧美成aⅴ人在线观看 | 亚洲同性gay激情无套| 久久九九影视网| 国产女主播一区| 亚洲欧洲日产国产综合网| 国产精品美女久久久久久| 日本一区二区三级电影在线观看| 精品福利一二区| 欧美国产国产综合| 国产精品大尺度| 亚洲丝袜另类动漫二区| 亚洲欧美aⅴ...| 午夜视频在线观看一区二区三区| 日韩在线一区二区三区| 日本成人在线电影网| 九色综合国产一区二区三区| 国产福利一区二区三区在线视频| 国产精品123| av亚洲精华国产精华精| 色国产综合视频| 欧美人xxxx| 久久久久国产精品麻豆ai换脸| 国产日产欧美一区二区三区| 国产精品高清亚洲| 午夜精品久久久久久久久久| 六月丁香综合在线视频| 成人综合在线观看| 欧美日韩大陆一区二区| 亚洲精品一区二区三区香蕉| 国产精品视频线看| 亚洲第一福利一区| 国产大陆a不卡| 在线一区二区三区四区| 日韩欧美国产综合| 国产女人18水真多18精品一级做| 亚洲乱码国产乱码精品精98午夜| 天天av天天翘天天综合网色鬼国产| 黄色小说综合网站| 欧美在线免费播放| 久久精品亚洲一区二区三区浴池| 亚洲欧洲av另类| 久久精品国产成人一区二区三区| 97aⅴ精品视频一二三区| 日韩一区二区三区精品视频| 中文字幕一区二区三区视频| 日本不卡一二三区黄网| 不卡的av电影| 精品欧美一区二区三区精品久久| 亚洲精品欧美激情|