From b8c9897cf16ce36657ec28d73bc2eee330c38882 Mon Sep 17 00:00:00 2001 From: robxnano <89391914+robxnano@users.noreply.github.com> Date: Sat, 8 Apr 2023 09:56:31 +0100 Subject: [PATCH] Replace C++ style comments for ANSI C compatibility Allows successful compilation with -std=c89 -D_XOPEN_SOURCE=500 on Linux gcc. --- GUI/xephem/earthmenu.c | 4 ++-- GUI/xephem/net.h | 4 ++-- libastro/riset_cir.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GUI/xephem/earthmenu.c b/GUI/xephem/earthmenu.c index 04aecdf..0557d98 100644 --- a/GUI/xephem/earthmenu.c +++ b/GUI/xephem/earthmenu.c @@ -3376,7 +3376,7 @@ short *xp, *yp; /* projected location onto drawing surface */ unsigned h = d + 2*hb; double dL; - // *yp = (int)floor(h/2.0 * (1.0 - sin(pl)) + 0.5); + /* *yp = (int)floor(h/2.0 * (1.0 - sin(pl)) + 0.5); */ *yp = (int)floor(h/2.0 * (1.0 - 2*pl/PI) + 0.5); dL = pL - elng; @@ -3640,7 +3640,7 @@ double *ltp, *lgp; /* resulting lat/long, rads */ if (x < 0 || x >= maxx || y < 0 || y >= maxy) return (0); - //*ltp = asin (1.0 - 2.0*y/maxy); + /* *ltp = asin (1.0 - 2.0*y/maxy); */ *ltp = PI * (1.0 - 2.0*y/maxy) / 2; *lgp = 2*PI*(x - maxx/2)/maxx + elng; diff --git a/GUI/xephem/net.h b/GUI/xephem/net.h index 879b865..fd8c3cc 100644 --- a/GUI/xephem/net.h +++ b/GUI/xephem/net.h @@ -23,8 +23,8 @@ #include typedef struct { - int fd; //file desciptor for the underlying connection socket - SSL *ssl; //ssl connection for use with SSL_read( )and SSL_write() + int fd; /* file desciptor for the underlying connection socket */ + SSL *ssl; /* ssl connection for use with SSL_read( )and SSL_write() */ } XE_SSL_FD; /* support functions */ diff --git a/libastro/riset_cir.c b/libastro/riset_cir.c index 648c791..2793fe7 100644 --- a/libastro/riset_cir.c +++ b/libastro/riset_cir.c @@ -308,7 +308,7 @@ Obj *op) /* working object -- returns as answer */ return (-3); } while (fabs(dt)>TMACC); - // fprintf (stderr, "%s 0alt npasses = %d\n", op->o_name, npasses); + /* fprintf (stderr, "%s 0alt npasses = %d\n", op->o_name, npasses); */ /* return codes */ return (fabs(mjdn-mjd) < .5 ? 0 : -2);