Deleted Added
full compact
fty_alpha.c (166124) fty_alpha.c (174993)
1/****************************************************************************
1/****************************************************************************
2 * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
2 * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
3 * *
4 * Permission is hereby granted, free of charge, to any person obtaining a *
5 * copy of this software and associated documentation files (the *
6 * "Software"), to deal in the Software without restriction, including *
7 * without limitation the rights to use, copy, modify, merge, publish, *
8 * distribute, distribute with modifications, sublicense, and/or sell *
9 * copies of the Software, and to permit persons to whom the Software is *
10 * furnished to do so, subject to the following conditions: *

--- 18 unchanged lines hidden (view full) ---

29/***************************************************************************
30* *
31* Author : Juergen Pfeifer *
32* *
33***************************************************************************/
34
35#include "form.priv.h"
36
3 * *
4 * Permission is hereby granted, free of charge, to any person obtaining a *
5 * copy of this software and associated documentation files (the *
6 * "Software"), to deal in the Software without restriction, including *
7 * without limitation the rights to use, copy, modify, merge, publish, *
8 * distribute, distribute with modifications, sublicense, and/or sell *
9 * copies of the Software, and to permit persons to whom the Software is *
10 * furnished to do so, subject to the following conditions: *

--- 18 unchanged lines hidden (view full) ---

29/***************************************************************************
30* *
31* Author : Juergen Pfeifer *
32* *
33***************************************************************************/
34
35#include "form.priv.h"
36
37MODULE_ID("$Id: fty_alpha.c,v 1.21 2006/04/22 21:33:05 tom Exp $")
37MODULE_ID("$Id: fty_alpha.c,v 1.23 2007/10/13 19:32:09 tom Exp $")
38
39#define thisARG alphaARG
40
41typedef struct
42 {
43 int width;
44 }
45thisARG;

--- 4 unchanged lines hidden (view full) ---

50|
51| Description : Allocate structure for alpha type argument.
52|
53| Return Values : Pointer to argument structure or NULL on error
54+--------------------------------------------------------------------------*/
55static void *
56Make_This_Type(va_list *ap)
57{
38
39#define thisARG alphaARG
40
41typedef struct
42 {
43 int width;
44 }
45thisARG;

--- 4 unchanged lines hidden (view full) ---

50|
51| Description : Allocate structure for alpha type argument.
52|
53| Return Values : Pointer to argument structure or NULL on error
54+--------------------------------------------------------------------------*/
55static void *
56Make_This_Type(va_list *ap)
57{
58 thisARG *argp = (thisARG *) malloc(sizeof(thisARG));
58 thisARG *argp = typeMalloc(thisARG, 1);
59
60 if (argp)
59
60 if (argp)
61 argp->width = va_arg(*ap, int);
61 {
62 T((T_CREATE("thisARG %p"), argp));
63 argp->width = va_arg(*ap, int);
64 }
62
63 return ((void *)argp);
64}
65
66/*---------------------------------------------------------------------------
67| Facility : libnform
68| Function : static void *Copy_This_Type(const void * argp)
69|
70| Description : Copy structure for alpha type argument.
71|
72| Return Values : Pointer to argument structure or NULL on error.
73+--------------------------------------------------------------------------*/
74static void *
75Copy_This_Type(const void *argp)
76{
77 const thisARG *ap = (const thisARG *)argp;
65
66 return ((void *)argp);
67}
68
69/*---------------------------------------------------------------------------
70| Facility : libnform
71| Function : static void *Copy_This_Type(const void * argp)
72|
73| Description : Copy structure for alpha type argument.
74|
75| Return Values : Pointer to argument structure or NULL on error.
76+--------------------------------------------------------------------------*/
77static void *
78Copy_This_Type(const void *argp)
79{
80 const thisARG *ap = (const thisARG *)argp;
78 thisARG *result = (thisARG *) malloc(sizeof(thisARG));
81 thisARG *result = typeMalloc(thisARG, 1);
79
80 if (result)
82
83 if (result)
81 *result = *ap;
84 {
85 T((T_CREATE("thisARG %p"), result));
86 *result = *ap;
87 }
82
83 return ((void *)result);
84}
85
86/*---------------------------------------------------------------------------
87| Facility : libnform
88| Function : static void Free_This_Type(void *argp)
89|

--- 72 unchanged lines hidden ---
88
89 return ((void *)result);
90}
91
92/*---------------------------------------------------------------------------
93| Facility : libnform
94| Function : static void Free_This_Type(void *argp)
95|

--- 72 unchanged lines hidden ---