mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
k&r->ansi some stuff
ansify and "fix" function pointer declarations
This commit is contained in:
committed by
Carlos R. Mafra
parent
6924454836
commit
9af6316d1d
@@ -234,8 +234,7 @@ RImage *RScaleImage(RImage * src, unsigned new_width, unsigned new_height)
|
|||||||
#if 0
|
#if 0
|
||||||
#define filter_support (1.0)
|
#define filter_support (1.0)
|
||||||
|
|
||||||
static double filter(t)
|
static double filter(double t)
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
/* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */
|
/* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */
|
||||||
if (t < 0.0)
|
if (t < 0.0)
|
||||||
@@ -247,8 +246,7 @@ double t;
|
|||||||
#endif
|
#endif
|
||||||
#define box_support (0.5)
|
#define box_support (0.5)
|
||||||
|
|
||||||
static double box_filter(t)
|
static double box_filter(double t)
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
if ((t > -0.5) && (t <= 0.5))
|
if ((t > -0.5) && (t <= 0.5))
|
||||||
return (1.0);
|
return (1.0);
|
||||||
@@ -257,8 +255,7 @@ double t;
|
|||||||
|
|
||||||
#define triangle_support (1.0)
|
#define triangle_support (1.0)
|
||||||
|
|
||||||
static double triangle_filter(t)
|
static double triangle_filter(double t)
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
if (t < 0.0)
|
if (t < 0.0)
|
||||||
t = -t;
|
t = -t;
|
||||||
@@ -269,8 +266,7 @@ double t;
|
|||||||
|
|
||||||
#define bell_support (1.5)
|
#define bell_support (1.5)
|
||||||
|
|
||||||
static double bell_filter(t) /* box (*) box (*) box */
|
static double bell_filter(double t) /* box (*) box (*) box */
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
if (t < 0)
|
if (t < 0)
|
||||||
t = -t;
|
t = -t;
|
||||||
@@ -285,8 +281,7 @@ double t;
|
|||||||
|
|
||||||
#define B_spline_support (2.0)
|
#define B_spline_support (2.0)
|
||||||
|
|
||||||
static double B_spline_filter(t) /* box (*) box (*) box (*) box */
|
static double B_spline_filter(double t) /* box (*) box (*) box (*) box */
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
double tt;
|
double tt;
|
||||||
|
|
||||||
@@ -302,8 +297,7 @@ double t;
|
|||||||
return (0.0);
|
return (0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static double sinc(x)
|
static double sinc(double x)
|
||||||
double x;
|
|
||||||
{
|
{
|
||||||
x *= PI;
|
x *= PI;
|
||||||
if (x != 0)
|
if (x != 0)
|
||||||
@@ -313,8 +307,7 @@ double x;
|
|||||||
|
|
||||||
#define Lanczos3_support (3.0)
|
#define Lanczos3_support (3.0)
|
||||||
|
|
||||||
static double Lanczos3_filter(t)
|
static double Lanczos3_filter(double t)
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
if (t < 0)
|
if (t < 0)
|
||||||
t = -t;
|
t = -t;
|
||||||
@@ -328,8 +321,7 @@ double t;
|
|||||||
#define B (1.0 / 3.0)
|
#define B (1.0 / 3.0)
|
||||||
#define C (1.0 / 3.0)
|
#define C (1.0 / 3.0)
|
||||||
|
|
||||||
static double Mitchell_filter(t)
|
static double Mitchell_filter(double t)
|
||||||
double t;
|
|
||||||
{
|
{
|
||||||
double tt;
|
double tt;
|
||||||
|
|
||||||
@@ -351,7 +343,7 @@ double t;
|
|||||||
return (0.0);
|
return (0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static double (*filterf) () = Mitchell_filter;
|
static double (*filterf)(double) = Mitchell_filter;
|
||||||
static double fwidth = Mitchell_support;
|
static double fwidth = Mitchell_support;
|
||||||
|
|
||||||
void _wraster_change_filter(int type)
|
void _wraster_change_filter(int type)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
static int shmError;
|
static int shmError;
|
||||||
|
|
||||||
static int (*oldErrorHandler) ();
|
static int (*oldErrorHandler)(Display *dpy, XErrorEvent *err);
|
||||||
|
|
||||||
static int errorHandler(Display * dpy, XErrorEvent * err)
|
static int errorHandler(Display * dpy, XErrorEvent * err)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user