mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
- put back wmksize(), wmkrange() and wmkpoint() as functions instead of macros
- fixed some compilation warnings with -Wall - some code cleanup
This commit is contained in:
@@ -592,6 +592,7 @@ removeConnection(void *observer, WMNotification *notification)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
static Bool
|
static Bool
|
||||||
isDifferent(char *str1, char *str2) /*FOLD00*/
|
isDifferent(char *str1, char *str2) /*FOLD00*/
|
||||||
{
|
{
|
||||||
@@ -600,6 +601,7 @@ isDifferent(char *str1, char *str2) /*FOLD00*/
|
|||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ int numberOfRows(WMTableViewDelegate *self, WMTableView *table)
|
|||||||
|
|
||||||
void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
||||||
{
|
{
|
||||||
WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);
|
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);*/
|
||||||
int i;
|
int i;
|
||||||
if (col1[0] == 0) {
|
if (col1[0] == 0) {
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
@@ -90,7 +90,7 @@ main(int argc, char **argv)
|
|||||||
table = WMCreateTableView(win);
|
table = WMCreateTableView(win);
|
||||||
WMResizeWidget(table, 400, 200);
|
WMResizeWidget(table, 400, 200);
|
||||||
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
||||||
// WMSetTableViewGridColor(table, WMGrayColor(scr));
|
/*WMSetTableViewGridColor(table, WMGrayColor(scr));*/
|
||||||
WMSetTableViewHeaderHeight(table, 20);
|
WMSetTableViewHeaderHeight(table, 20);
|
||||||
WMSetTableViewDelegate(table, &delegate);
|
WMSetTableViewDelegate(table, &delegate);
|
||||||
WMSetTableViewAction(table, clickedTable, table);
|
WMSetTableViewAction(table, clickedTable, table);
|
||||||
|
|||||||
@@ -381,10 +381,7 @@ WMTableView *WMCreateTableView(WMWidget *parent)
|
|||||||
|
|
||||||
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
|
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
|
||||||
{
|
{
|
||||||
int width;
|
|
||||||
int i;
|
|
||||||
WMScreen *scr = WMWidgetScreen(table);
|
WMScreen *scr = WMWidgetScreen(table);
|
||||||
int count;
|
|
||||||
|
|
||||||
column->table = table;
|
column->table = table;
|
||||||
|
|
||||||
@@ -952,7 +949,7 @@ static void rearrangeHeader(WMTableView *table)
|
|||||||
int width;
|
int width;
|
||||||
int count;
|
int count;
|
||||||
int i;
|
int i;
|
||||||
WMRect rect = WMGetScrollViewVisibleRect(table->scrollView);
|
/*WMRect rect = WMGetScrollViewVisibleRect(table->scrollView);*/
|
||||||
|
|
||||||
width = 0;
|
width = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ libWINGs_a_SOURCES = \
|
|||||||
host.c \
|
host.c \
|
||||||
international.c \
|
international.c \
|
||||||
memory.c \
|
memory.c \
|
||||||
|
misc.c \
|
||||||
notification.c \
|
notification.c \
|
||||||
selection.c \
|
selection.c \
|
||||||
string.c \
|
string.c \
|
||||||
@@ -87,6 +88,7 @@ libWUtil_a_SOURCES = \
|
|||||||
host.c \
|
host.c \
|
||||||
international.c \
|
international.c \
|
||||||
memory.c \
|
memory.c \
|
||||||
|
misc.c \
|
||||||
notification.c \
|
notification.c \
|
||||||
string.c \
|
string.c \
|
||||||
tree.c \
|
tree.c \
|
||||||
|
|||||||
@@ -194,11 +194,7 @@ singleClick(WMWidget *self, void *data)
|
|||||||
static void
|
static void
|
||||||
doubleClick(WMWidget *self, void *data)
|
doubleClick(WMWidget *self, void *data)
|
||||||
{
|
{
|
||||||
WMLabel *label = (WMLabel*)data;
|
WMSelectAllListItems((WMList*)self);
|
||||||
WMList *lPtr = (WMList*)self;
|
|
||||||
char buf[255];
|
|
||||||
|
|
||||||
WMSelectAllListItems(lPtr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ typedef struct {
|
|||||||
WMSize size;
|
WMSize size;
|
||||||
} WMRect;
|
} WMRect;
|
||||||
|
|
||||||
#define wmksize(width, height) (WMSize){(width), (height)}
|
|
||||||
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
|
||||||
#define wmkrect(pos, size) (WMRect){(pos), (size)}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -577,6 +574,17 @@ typedef struct W_DragDestinationProcs {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ...................................................................... */
|
||||||
|
|
||||||
|
|
||||||
|
WMPoint wmkpoint(int x, int y);
|
||||||
|
|
||||||
|
WMSize wmksize(unsigned int width, unsigned int height);
|
||||||
|
|
||||||
|
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||||
|
#define wmksize(width, height) (WMSize){(width), (height)}
|
||||||
|
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
|
|
||||||
|
|||||||
@@ -154,8 +154,6 @@ typedef struct {
|
|||||||
int count;
|
int count;
|
||||||
} WMRange;
|
} WMRange;
|
||||||
|
|
||||||
#define wmkrange(position, count) (WMRange){(position), (count)}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* DO NOT ACCESS THE CONTENTS OF THIS STRUCT */
|
/* DO NOT ACCESS THE CONTENTS OF THIS STRUCT */
|
||||||
@@ -277,6 +275,11 @@ void wtokenfree(char **tokens, int count);
|
|||||||
char* wtrimspace(char *s);
|
char* wtrimspace(char *s);
|
||||||
|
|
||||||
|
|
||||||
|
WMRange wmkrange(int start, int count);
|
||||||
|
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||||
|
#define wmkrange(position, count) (WMRange){(position), (count)}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char* wusergnusteppath();
|
char* wusergnusteppath();
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
|
|||||||
if (cPtr->state == WCInProgress) {
|
if (cPtr->state == WCInProgress) {
|
||||||
Bool failed;
|
Bool failed;
|
||||||
int result;
|
int result;
|
||||||
int len = sizeof(result);
|
socklen_t len = sizeof(result);
|
||||||
|
|
||||||
WCErrorCode = 0;
|
WCErrorCode = 0;
|
||||||
if (getsockopt(cPtr->sock, SOL_SOCKET, SO_ERROR,
|
if (getsockopt(cPtr->sock, SOL_SOCKET, SO_ERROR,
|
||||||
@@ -393,7 +393,8 @@ WMCreateConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
|||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in clientname;
|
struct sockaddr_in clientname;
|
||||||
int size, n;
|
socklen_t size;
|
||||||
|
int n;
|
||||||
|
|
||||||
cPtr = createConnectionWithSocket(sock, closeOnRelease);
|
cPtr = createConnectionWithSocket(sock, closeOnRelease);
|
||||||
cPtr->wasNonBlocking = WMIsConnectionNonBlocking(cPtr);
|
cPtr->wasNonBlocking = WMIsConnectionNonBlocking(cPtr);
|
||||||
@@ -441,7 +442,8 @@ WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /
|
|||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in *socketaddr;
|
struct sockaddr_in *socketaddr;
|
||||||
int sock, size, on;
|
int sock, on;
|
||||||
|
socklen_t size;
|
||||||
|
|
||||||
WCErrorCode = 0;
|
WCErrorCode = 0;
|
||||||
|
|
||||||
@@ -652,7 +654,7 @@ WMConnection*
|
|||||||
WMAcceptConnection(WMConnection *listener) /*FOLD00*/
|
WMAcceptConnection(WMConnection *listener) /*FOLD00*/
|
||||||
{
|
{
|
||||||
struct sockaddr_in clientname;
|
struct sockaddr_in clientname;
|
||||||
int size;
|
socklen_t size;
|
||||||
int newSock;
|
int newSock;
|
||||||
WMConnection *newConnection;
|
WMConnection *newConnection;
|
||||||
|
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ receivedData(WMView *view, Atom selection, Atom target, Time timestamp,
|
|||||||
Bool WMRequestDroppedData(WMView *view, WMDraggingInfo *info, char *type,
|
Bool WMRequestDroppedData(WMView *view, WMDraggingInfo *info, char *type,
|
||||||
WMDropDataCallback *callback)
|
WMDropDataCallback *callback)
|
||||||
{
|
{
|
||||||
WMScreen *scr = W_VIEW_SCREEN(view);
|
|
||||||
#if 0
|
#if 0
|
||||||
|
WMScreen *scr = W_VIEW_SCREEN(view);
|
||||||
if (info->finished) {
|
if (info->finished) {
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,7 +260,6 @@ void
|
|||||||
WMDeleteIdleHandler(WMHandlerID handlerID)
|
WMDeleteIdleHandler(WMHandlerID handlerID)
|
||||||
{
|
{
|
||||||
IdleHandler *handler = (IdleHandler*)handlerID;
|
IdleHandler *handler = (IdleHandler*)handlerID;
|
||||||
int pos;
|
|
||||||
|
|
||||||
if (!handler || !idleHandler)
|
if (!handler || !idleHandler)
|
||||||
return;
|
return;
|
||||||
@@ -295,7 +294,6 @@ void
|
|||||||
WMDeleteInputHandler(WMHandlerID handlerID)
|
WMDeleteInputHandler(WMHandlerID handlerID)
|
||||||
{
|
{
|
||||||
InputHandler *handler = (InputHandler*)handlerID;
|
InputHandler *handler = (InputHandler*)handlerID;
|
||||||
int pos;
|
|
||||||
|
|
||||||
if (!handler || !inputHandler)
|
if (!handler || !inputHandler)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -193,8 +193,6 @@ WMRetainHost(WMHost *hPtr)
|
|||||||
void
|
void
|
||||||
WMReleaseHost(WMHost *hPtr)
|
WMReleaseHost(WMHost *hPtr)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
hPtr->refCount--;
|
hPtr->refCount--;
|
||||||
|
|
||||||
if (hPtr->refCount > 0)
|
if (hPtr->refCount > 0)
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ handleActionEvents(XEvent *event, void *data)
|
|||||||
if (event->xbutton.button == Button1) {
|
if (event->xbutton.button == Button1) {
|
||||||
if (bPtr->flags.pushed) {
|
if (bPtr->flags.pushed) {
|
||||||
if (bPtr->groupIndex==0 ||
|
if (bPtr->groupIndex==0 ||
|
||||||
bPtr->flags.selected && bPtr->groupIndex > 0)
|
(bPtr->flags.selected && bPtr->groupIndex > 0))
|
||||||
doclick = 1;
|
doclick = 1;
|
||||||
dopaint = 1;
|
dopaint = 1;
|
||||||
if (bPtr->flags.springLoaded) {
|
if (bPtr->flags.springLoaded) {
|
||||||
|
|||||||
@@ -284,6 +284,12 @@ enum {
|
|||||||
|
|
||||||
#define MAX_LENGTH 1024
|
#define MAX_LENGTH 1024
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI 3.14159265358979323846
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int fetchFile(char* toPath, char *imageSrcFile,
|
static int fetchFile(char* toPath, char *imageSrcFile,
|
||||||
char *imageDestFileName);
|
char *imageDestFileName);
|
||||||
char *generateNewFilename(char *curName);
|
char *generateNewFilename(char *curName);
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ int
|
|||||||
WMHandleEvent(XEvent *event)
|
WMHandleEvent(XEvent *event)
|
||||||
{
|
{
|
||||||
W_EventHandler *hPtr;
|
W_EventHandler *hPtr;
|
||||||
W_View *view, *vPtr, *toplevel;
|
W_View *view, *toplevel;
|
||||||
unsigned long mask;
|
unsigned long mask;
|
||||||
Window window;
|
Window window;
|
||||||
WMArrayIterator iter;
|
WMArrayIterator iter;
|
||||||
|
|||||||
@@ -370,7 +370,6 @@ WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
|||||||
char *path, char *name, char **fileTypes)
|
char *path, char *name, char **fileTypes)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
XEvent event;
|
|
||||||
|
|
||||||
if (name && !owner) {
|
if (name && !owner) {
|
||||||
WMSetWindowTitle(panel->win, name);
|
WMSetWindowTitle(panel->win, name);
|
||||||
|
|||||||
@@ -316,5 +316,31 @@ W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WMPoint
|
||||||
|
wmkpoint(int x, int y)
|
||||||
|
{
|
||||||
|
WMPoint point;
|
||||||
|
|
||||||
|
point.x = x;
|
||||||
|
point.y = y;
|
||||||
|
|
||||||
|
return point;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WMSize
|
||||||
|
wmksize(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
WMSize size;
|
||||||
|
|
||||||
|
size.width = width;
|
||||||
|
size.height = height;
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -782,8 +782,6 @@ handleActionEvents(XEvent *event, void *data)
|
|||||||
static void
|
static void
|
||||||
destroyPopUpButton(PopUpButton *bPtr)
|
destroyPopUpButton(PopUpButton *bPtr)
|
||||||
{
|
{
|
||||||
WMMenuItem *item;
|
|
||||||
|
|
||||||
if (bPtr->timer) {
|
if (bPtr->timer) {
|
||||||
WMDeleteTimerHandler(bPtr->timer);
|
WMDeleteTimerHandler(bPtr->timer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,7 +378,6 @@ WMTabViewItem*
|
|||||||
WMTabViewItemAtPoint(WMTabView *tPtr, int x, int y)
|
WMTabViewItemAtPoint(WMTabView *tPtr, int x, int y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int offset;
|
|
||||||
int count = tPtr->visibleTabs;
|
int count = tPtr->visibleTabs;
|
||||||
int first = tPtr->firstVisible;
|
int first = tPtr->firstVisible;
|
||||||
|
|
||||||
@@ -526,7 +525,7 @@ static void
|
|||||||
recalcTabWidth(TabView *tPtr)
|
recalcTabWidth(TabView *tPtr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int twidth = W_VIEW(tPtr)->size.width;
|
/*int twidth = W_VIEW(tPtr)->size.width;*/
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
if (tPtr->flags.uniformTabs) {
|
if (tPtr->flags.uniformTabs) {
|
||||||
@@ -679,7 +678,7 @@ paintTabView(TabView *tPtr)
|
|||||||
int moreAtLeft;
|
int moreAtLeft;
|
||||||
int moreAtRight;
|
int moreAtRight;
|
||||||
int selectedIsVisible;
|
int selectedIsVisible;
|
||||||
int tx, ty;
|
int ty;
|
||||||
int twidth, theight;
|
int twidth, theight;
|
||||||
|
|
||||||
ty = 2;
|
ty = 2;
|
||||||
|
|||||||
@@ -178,16 +178,21 @@ typedef struct W_Text {
|
|||||||
|
|
||||||
#define TYPETEXT 0
|
#define TYPETEXT 0
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* just to print blocks of text not terminated by \0 */
|
/* just to print blocks of text not terminated by \0 */
|
||||||
static void
|
static void
|
||||||
output(char *ptr, int len)
|
output(char *ptr, int len)
|
||||||
{
|
{
|
||||||
char s[len+1];
|
char *s;
|
||||||
|
|
||||||
|
s = wmalloc(len+1);
|
||||||
memcpy(s, ptr, len);
|
memcpy(s, ptr, len);
|
||||||
s[len] = 0;
|
s[len] = 0;
|
||||||
/* printf(" s is [%s] (%d)\n", s, strlen(s)); */
|
/* printf(" s is [%s] (%d)\n", s, strlen(s)); */
|
||||||
printf("[%s]\n", s);
|
printf("[%s]\n", s);
|
||||||
|
wfree(s);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if DO_BLINK
|
#if DO_BLINK
|
||||||
@@ -829,7 +834,7 @@ _getSibling:
|
|||||||
|
|
||||||
tb->selected = True;
|
tb->selected = True;
|
||||||
XFillRectangle(dpy, d, tPtr->stippledGC,
|
XFillRectangle(dpy, d, tPtr->stippledGC,
|
||||||
//XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,
|
/*XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,*/
|
||||||
rect.x, rect.y, rect.width, rect.height);
|
rect.x, rect.y, rect.width, rect.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2025,20 +2030,22 @@ insertTextInteractively(Text *tPtr, char *text, int len)
|
|||||||
if ((newline = strchr(text, '\n'))) {
|
if ((newline = strchr(text, '\n'))) {
|
||||||
int nlen = (int)(newline-text);
|
int nlen = (int)(newline-text);
|
||||||
int s = tb->used - tPtr->tpos;
|
int s = tb->used - tPtr->tpos;
|
||||||
char save[s];
|
|
||||||
|
|
||||||
|
|
||||||
if (!tb->blank && nlen>0) {
|
if (!tb->blank && nlen>0) {
|
||||||
if (s > 0) {
|
char *save;
|
||||||
|
|
||||||
|
if (s > 0) {
|
||||||
|
save = wmalloc(s);
|
||||||
memcpy(save, &tb->text[tPtr->tpos], s);
|
memcpy(save, &tb->text[tPtr->tpos], s);
|
||||||
tb->used -= (tb->used - tPtr->tpos);
|
tb->used -= (tb->used - tPtr->tpos);
|
||||||
}
|
}
|
||||||
insertTextInteractively(tPtr, text, nlen);
|
insertTextInteractively(tPtr, text, nlen);
|
||||||
newline++;
|
newline++;
|
||||||
WMAppendTextStream(tPtr, newline);
|
WMAppendTextStream(tPtr, newline);
|
||||||
if (s>0)
|
if (s>0) {
|
||||||
insertTextInteractively(tPtr, save, s);
|
insertTextInteractively(tPtr, save, s);
|
||||||
|
wfree(save);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tPtr->tpos>0 && tPtr->tpos < tb->used
|
if (tPtr->tpos>0 && tPtr->tpos < tb->used
|
||||||
&& !tb->graphic && tb->text) {
|
&& !tb->graphic && tb->text) {
|
||||||
@@ -2079,7 +2086,6 @@ insertTextInteractively(Text *tPtr, char *text, int len)
|
|||||||
tPtr->currentTextBlock = tPtr->currentTextBlock->next;
|
tPtr->currentTextBlock = tPtr->currentTextBlock->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (tb->used + len >= tb->allocated) {
|
if (tb->used + len >= tb->allocated) {
|
||||||
tb->allocated = reqBlockSize(tb->used+len);
|
tb->allocated = reqBlockSize(tb->used+len);
|
||||||
@@ -2589,14 +2595,15 @@ handleActionEvents(XEvent *event, void *data)
|
|||||||
|
|
||||||
tPtr->lastClickTime = event->xbutton.time;
|
tPtr->lastClickTime = event->xbutton.time;
|
||||||
if(tb && tb->graphic && !tb->object) {
|
if(tb && tb->graphic && !tb->object) {
|
||||||
char desc[tb->used+1];
|
if(tPtr->delegate && tPtr->delegate->didDoubleClickOnPicture) {
|
||||||
|
char *desc;
|
||||||
|
|
||||||
|
desc = wmalloc(tb->used+1);
|
||||||
memcpy(desc, tb->text, tb->used);
|
memcpy(desc, tb->text, tb->used);
|
||||||
desc[tb->used] = 0;
|
desc[tb->used] = 0;
|
||||||
if(tPtr->delegate) {
|
(*tPtr->delegate->didDoubleClickOnPicture)(tPtr->delegate, desc);
|
||||||
if(tPtr->delegate->didDoubleClickOnPicture)
|
wfree(desc);
|
||||||
(*tPtr->delegate->didDoubleClickOnPicture)
|
}
|
||||||
(tPtr->delegate, desc);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
autoSelectText(tPtr, 2);
|
autoSelectText(tPtr, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef PI
|
#ifndef PI
|
||||||
#define PI 3.141592654
|
#define PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef PI
|
#ifndef PI
|
||||||
#define PI 3.141592
|
#define PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user