ReactOS  0.4.14-dev-593-g1793dcc
server.c File Reference
#include <windows.h>
#include <ole2.h>
#include <oleauto.h>
#include <secext.h>
#include <rpcdce.h>
#include <netfw.h>
#include "wine/test.h"
#include "server_s.h"
#include "server_interp_s.h"
#include "server_defines.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for server.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define SKIP_TYPE_DECLS
 
#define PORT   "4114"
 
#define PIPE   "\\pipe\\wine_rpcrt4_test"
 
#define INT_CODE   4198
 
#define SERVER_FUNCTIONS
 
#define X(name)   name = interp_##name;
 
#define X(name)   name = mixed_##name;
 
#define test_is_server_listening(a, b)   _test_is_server_listening(__LINE__,a,b)
 
#define test_is_server_listening2(a, b, c)   _test_is_server_listening2(__LINE__,a,b,c)
 

Enumerations

enum  firewall_op {
  APP_ADD, APP_REMOVE, APP_ADD, APP_REMOVE,
  APP_ADD, APP_REMOVE
}
 

Functions

static void (WINAPI *pNDRSContextMarshall2)(RPC_BINDING_HANDLE
 
static NDR_SCONTEXT (WINAPI *pNDRSContextUnmarshall2)(RPC_BINDING_HANDLE
 
static RPC_STATUS (WINAPI *pRpcServerRegisterIfEx)(RPC_IF_HANDLE
 
static int (__cdecl *int_return)(void)
 
static signed char (__cdecl *sum_char)(signed char x
 
static short (__cdecl *sum_short)(short x
 
static hyper (__cdecl *sum_hyper)(hyper x
 
static void (__cdecl *square_out)(int x
 
static double (__cdecl *square_half)(double x
 
static float (__cdecl *square_half_float)(float x
 
static LONG (__cdecl *square_half_long)(LONG x
 
static unsigned (__cdecl *hash_bstr)(bstr_t s)
 
static s123_t *__cdeclget_s123 (void)
 
static str_t (__cdecl *get_filename)(void)
 
static rint_t (__cdecl *echo_ranged_int)(int i
 
static ctx_handle_t (__cdecl *get_handle)(void)
 
static void set_interp_interface (void)
 
static void set_mixed_interface (void)
 
static void InitFunctionPointers (void)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T n)
 
void __RPC_USER midl_user_free (void __RPC_FAR *p)
 
static charxstrdup (const char *s)
 
int __cdecl s_int_return (void)
 
int __cdecl s_square (int x)
 
int __cdecl s_sum (int x, int y)
 
signed char __cdecl s_sum_char (signed char x, signed char y)
 
short __cdecl s_sum_short (short x, short y)
 
int __cdecl s_sum_float (float x, float y)
 
int __cdecl s_sum_double_int (int x, double y)
 
hyper __cdecl s_sum_hyper (hyper x, hyper y)
 
int __cdecl s_sum_hyper_int (hyper x, hyper y)
 
int __cdecl s_sum_char_hyper (signed char x, hyper y)
 
void __cdecl s_square_out (int x, int *y)
 
void __cdecl s_square_ref (int *x)
 
int __cdecl s_str_length (const char *s)
 
int __cdecl s_str_t_length (str_t s)
 
int __cdecl s_cstr_length (const char *s, int n)
 
int __cdecl s_dot_self (vector_t *v)
 
double __cdecl s_square_half (double x, double *y)
 
float __cdecl s_square_half_float (float x, float *y)
 
LONG __cdecl s_square_half_long (LONG x, LONG *y)
 
int __cdecl s_sum_fixed_array (int a[5])
 
int __cdecl s_pints_sum (pints_t *pints)
 
double __cdecl s_ptypes_sum (ptypes_t *pt)
 
int __cdecl s_dot_pvectors (pvectors_t *p)
 
int __cdecl s_sum_sp (sp_t *sp)
 
double __cdecl s_square_sun (sun_t *su)
 
int __cdecl s_test_list_length (test_list_t *list)
 
int __cdecl s_sum_fixed_int_3d (int m[2][3][4])
 
int __cdecl s_sum_conf_array (int x[], int n)
 
int __cdecl s_sum_conf_ptr_by_conf_ptr (int n1, int *n2_then_x1, int *x2)
 
int __cdecl s_sum_unique_conf_array (int x[], int n)
 
int __cdecl s_sum_unique_conf_ptr (int *x, int n)
 
int __cdecl s_sum_var_array (int x[20], int n)
 
int __cdecl s_sum_complex_array (int n, refpint_t pi[])
 
int __cdecl s_dot_two_vectors (vector_t vs[2])
 
void __cdecl s_get_number_array (int x[20], int *n)
 
int __cdecl s_sum_cs (cs_t *cs)
 
int __cdecl s_sum_cps (cps_t *cps)
 
int __cdecl s_sum_cpsc (cpsc_t *cpsc)
 
int __cdecl s_get_cpsc (int n, cpsc_t *cpsc)
 
int __cdecl s_square_puint (puint_t p)
 
int __cdecl s_sum_puints (puints_t *p)
 
int __cdecl s_sum_cpuints (cpuints_t *p)
 
int __cdecl s_dot_copy_vectors (vector_t u, vector_t v)
 
int __cdecl s_square_test_us (test_us_t *tus)
 
double __cdecl s_square_encu (encu_t *eu)
 
double __cdecl s_square_unencu (int t, unencu_t *eu)
 
void __cdecl s_check_se2 (se_t *s)
 
int __cdecl s_sum_parr (int *a[3])
 
int __cdecl s_sum_pcarr (int *a[], int n)
 
int __cdecl s_enum_ord (e_t e)
 
double __cdecl s_square_encue (encue_t *eue)
 
int __cdecl s_sum_toplev_conf_2n (int *x, int n)
 
int __cdecl s_sum_toplev_conf_cond (int *x, int a, int b, int c)
 
double __cdecl s_sum_aligns (aligns_t *a)
 
int __cdecl s_sum_padded (padded_t *p)
 
int __cdecl s_sum_padded2 (padded_t ps[2])
 
int __cdecl s_sum_padded_conf (padded_t *ps, int n)
 
int __cdecl s_sum_bogus (bogus_t *b)
 
void __cdecl s_check_null (int *null)
 
int __cdecl s_str_struct_len (str_struct_t *s)
 
int __cdecl s_wstr_struct_len (wstr_struct_t *s)
 
int __cdecl s_sum_doub_carr (doub_carr_t *dc)
 
void __cdecl s_make_pyramid_doub_carr (unsigned char n, doub_carr_t **dc)
 
unsigned __cdecl s_hash_bstr (bstr_t b)
 
void __cdecl s_get_a_bstr (bstr_t *b)
 
void __cdecl s_get_name (name_t *name)
 
void __cdecl s_get_names (int *n, str_array_t *names)
 
void __cdecl s_get_namesw (int *n, wstr_array_t *names)
 
int __cdecl s_sum_pcarr2 (int n, int **pa)
 
int __cdecl s_sum_L1_norms (int n, vector_t *vs)
 
s123_t *__cdecl s_get_s123 (void)
 
str_t __cdecl s_get_filename (void)
 
int __cdecl s_echo_ranged_int (int i, int j, int k)
 
int __cdecl s_echo_ranged_int2 (int i)
 
void __cdecl s_get_ranged_enum (renum_t *re)
 
void __cdecl s_context_handle_test (void)
 
void __cdecl s_get_numbers (int length, int size, pints_t n[])
 
void __cdecl s_get_numbers_struct (numbers_struct_t **ns)
 
void __cdecl s_full_pointer_test (int *a, int *b)
 
void __cdecl s_full_pointer_null_test (int *a, int *b)
 
void __cdecl s_stop (void)
 
void __cdecl s_stop_autolisten (void)
 
void __cdecl s_ip_test (ipu_t *a)
 
int __cdecl s_sum_ptr_array (int *a[2])
 
int __cdecl s_sum_array_ptr (int(*a)[2])
 
ctx_handle_t __cdecl s_get_handle (void)
 
void __cdecl s_get_handle_by_ptr (ctx_handle_t *r)
 
void __cdecl s_test_handle (ctx_handle_t ctx_handle)
 
void __RPC_USER ctx_handle_t_rundown (ctx_handle_t ctx_handle)
 
static void make_cmdline (char buffer[MAX_PATH], const char *test)
 
static void run_client (const char *test)
 
static void basic_tests (void)
 
static void union_tests (void)
 
static test_list_t * null_list (void)
 
static test_list_t * make_list (test_list_t *tail)
 
static void free_list (test_list_t *list)
 
ULONG __RPC_USER puint_t_UserSize (ULONG *flags, ULONG start, puint_t *p)
 
unsigned char *__RPC_USER puint_t_UserMarshal (ULONG *flags, unsigned char *buffer, puint_t *p)
 
unsigned char *__RPC_USER puint_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, puint_t *p)
 
void __RPC_USER puint_t_UserFree (ULONG *flags, puint_t *p)
 
ULONG __RPC_USER us_t_UserSize (ULONG *flags, ULONG start, us_t *pus)
 
unsigned char *__RPC_USER us_t_UserMarshal (ULONG *flags, unsigned char *buffer, us_t *pus)
 
unsigned char *__RPC_USER us_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, us_t *pus)
 
void __RPC_USER us_t_UserFree (ULONG *flags, us_t *pus)
 
ULONG __RPC_USER bstr_t_UserSize (ULONG *flags, ULONG start, bstr_t *b)
 
unsigned char *__RPC_USER bstr_t_UserMarshal (ULONG *flags, unsigned char *buffer, bstr_t *b)
 
unsigned char *__RPC_USER bstr_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, bstr_t *b)
 
void __RPC_USER bstr_t_UserFree (ULONG *flags, bstr_t *b)
 
static void pointer_tests (void)
 
static int check_pyramid_doub_carr (doub_carr_t *dc)
 
static void free_pyramid_doub_carr (doub_carr_t *dc)
 
static void array_tests (void)
 
void __cdecl s_authinfo_test (unsigned int protseq, int secure)
 
static void test_handle_return (void)
 
static void run_tests (void)
 
static void set_auth_info (RPC_BINDING_HANDLE handle)
 
static void _test_is_server_listening (unsigned line, RPC_BINDING_HANDLE binding, RPC_STATUS expected_status)
 
static void _test_is_server_listening2 (unsigned line, RPC_BINDING_HANDLE binding, RPC_STATUS expected_status, RPC_STATUS expected_status2)
 
static void client (const char *test)
 
static void server (void)
 
static DWORD WINAPI listen_test_client_thread (void *binding)
 
static DWORD WINAPI wait_listen_proc (void *arg)
 
static void test_stop_wait_for_call (unsigned char *binding)
 
static void test_server_listening (void)
 
static HANDLE create_server_process (void)
 
static void run_server (HANDLE ready_event)
 
static DWORD WINAPI basic_tests_thread (void *arg)
 
static void test_reconnect (void)
 
static BOOL is_process_elevated (void)
 
static BOOL is_firewall_enabled (void)
 
static HRESULT set_firewall (enum firewall_op op)
 
 START_TEST (server)
 

Variables

static const charprogname
 
static BOOL old_windows_version
 
static HANDLE stop_event
 
static HANDLE stop_wait_event
 
static NDR_SCONTEXT
 
static void NDR_RUNDOWN
 
static void void ULONG
 
static UUID RPC_MGR_EPV unsigned int
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_CSTR
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_AUTH_IDENTITY_HANDLE
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_SECURITY_QOS *static RPC_AUTH_KEY_RETRIEVAL_FN
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_SECURITY_QOS *static LPVOID
 
static chardomain_and_user
 
static int y
 
static int n
 
static intn2_then_x1
 
static int intx2
 
static cpsc_t * cpsc
 
static refpint_t pi []
 
static vector_t v
 
static unencu_t * eu
 
static int a
 
static int int b
 
static int int int c
 
static doub_carr_t ** dc
 
static str_array_t * names
 
static int ** pa
 
static vector_tvs
 
static int size
 
static int pints_t pn []
 
static int j
 
static int int k
 
static int secure
 
fnprintfp_printf = printf
 
static const WCHAR helloW [] = { 'H','e','l','l','o',0 }
 
static const WCHAR worldW [] = { 'W','o','r','l','d','!',0 }
 
static BOOL is_interp
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file server.c.

◆ INT_CODE

#define INT_CODE   4198

Definition at line 41 of file server.c.

◆ PIPE

#define PIPE   "\\pipe\\wine_rpcrt4_test"

Definition at line 39 of file server.c.

◆ PORT

#define PORT   "4114"

Definition at line 38 of file server.c.

◆ SERVER_FUNCTIONS

#define SERVER_FUNCTIONS

Definition at line 148 of file server.c.

◆ SKIP_TYPE_DECLS

#define SKIP_TYPE_DECLS

Definition at line 30 of file server.c.

◆ test_is_server_listening

#define test_is_server_listening (   a,
  b 
)    _test_is_server_listening(__LINE__,a,b)

Definition at line 1880 of file server.c.

◆ test_is_server_listening2

#define test_is_server_listening2 (   a,
  b,
  c 
)    _test_is_server_listening2(__LINE__,a,b,c)

Definition at line 1889 of file server.c.

◆ X [1/2]

#define X (   name)    name = interp_##name;

◆ X [2/2]

#define X (   name)    name = mixed_##name;

Enumeration Type Documentation

◆ firewall_op

Enumerator
APP_ADD 
APP_REMOVE 
APP_ADD 
APP_REMOVE 
APP_ADD 
APP_REMOVE 

Definition at line 2410 of file server.c.

2411 {
2412  APP_ADD,
2413  APP_REMOVE
2414 };

Function Documentation

◆ _test_is_server_listening()

static void _test_is_server_listening ( unsigned  line,
RPC_BINDING_HANDLE  binding,
RPC_STATUS  expected_status 
)
static

Definition at line 1881 of file server.c.

1882 {
1884  status = RpcMgmtIsServerListening(binding);
1885  ok_(__FILE__,line)(status == expected_status, "RpcMgmtIsServerListening returned %u, expected %u\n",
1886  status, expected_status);
1887 }
long RPC_STATUS
Definition: rpc.h:52
Definition: parser.c:48
RPC_STATUS WINAPI RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1704
static SERVICE_STATUS status
Definition: service.c:31
#define ok_(x1, x2)
Definition: atltest.h:61
Definition: ps.c:97

◆ _test_is_server_listening2()

static void _test_is_server_listening2 ( unsigned  line,
RPC_BINDING_HANDLE  binding,
RPC_STATUS  expected_status,
RPC_STATUS  expected_status2 
)
static

Definition at line 1890 of file server.c.

1892 {
1894  status = RpcMgmtIsServerListening(binding);
1895  ok_(__FILE__,line)(status == expected_status || status == expected_status2,
1896  "RpcMgmtIsServerListening returned %u, expected %u or %u\n",
1897  status, expected_status, expected_status2);
1898 }
long RPC_STATUS
Definition: rpc.h:52
Definition: parser.c:48
RPC_STATUS WINAPI RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1704
static SERVICE_STATUS status
Definition: service.c:31
#define ok_(x1, x2)
Definition: atltest.h:61
Definition: ps.c:97

◆ array_tests()

static void array_tests ( void  )
static

Definition at line 1613 of file server.c.

1614 {
1615  int m[2][3][4] =
1616  {
1617  {{1, 2, 3, 4}, {-1, -3, -5, -7}, {0, 2, 4, 6}},
1618  {{1, -2, 3, -4}, {2, 3, 5, 7}, {-4, -1, -14, 4114}}
1619  };
1620  int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
1621  int c2[] = {10, 100, 200};
1622  int c3[20];
1623  vector_t vs[2] = {{1, -2, 3}, {4, -5, -6}};
1624  cps_t cps;
1625  cpsc_t cpsc;
1626  cs_t *cs;
1627  int n;
1628  int ca[5] = {1, -2, 3, -4, 5};
1629  int tmp[10];
1630  doub_carr_t *dc;
1631  int *pi;
1632  pints_t api[5];
1633  numbers_struct_t *ns;
1634  refpint_t rpi[5];
1635  int i0 = 1, i1 = 2, *ptr_array[2] = {&i0, &i1}, array[2] = {3, 4};
1636 
1637  if (!old_windows_version)
1638  {
1639  const char str1[25] = "Hello";
1640  ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n");
1641  }
1642 
1643  ok(sum_fixed_int_3d(m) == 4116, "RPC sum_fixed_int_3d\n");
1644 
1645  ok(sum_conf_array(c, 10) == 45, "RPC sum_conf_array\n");
1646  ok(sum_conf_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
1647  ok(sum_conf_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
1648  ok(sum_conf_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
1649 
1650  ok(sum_conf_ptr_by_conf_ptr(1, c2, c) == 45, "RPC sum_conf_ptr_by_conf_ptr\n");
1651  ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 345, "RPC sum_conf_ptr_by_conf_ptr\n");
1652  c2[0] = 0;
1653  ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 300, "RPC sum_conf_ptr_by_conf_ptr\n");
1654 
1655  ok(sum_unique_conf_array(ca, 4) == -2, "RPC sum_unique_conf_array\n");
1656  ok(sum_unique_conf_ptr(ca, 5) == 3, "RPC sum_unique_conf_array\n");
1657  ok(sum_unique_conf_ptr(NULL, 10) == 0, "RPC sum_unique_conf_array\n");
1658 
1659  get_number_array(c3, &n);
1660  ok(n == 10, "RPC get_num_array\n");
1661  for (; n > 0; n--)
1662  ok(c3[n-1] == c[n-1], "get_num_array returned wrong value %d @ %d\n",
1663  c3[n-1], n);
1664  ok(sum_var_array(c, 10) == 45, "RPC sum_conf_array\n");
1665  ok(sum_var_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
1666  ok(sum_var_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
1667  ok(sum_var_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
1668 
1669  ok(dot_two_vectors(vs) == -4, "RPC dot_two_vectors\n");
1670  cs = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(cs_t, ca[5]));
1671  cs->n = 5;
1672  cs->ca[0] = 3;
1673  cs->ca[1] = 5;
1674  cs->ca[2] = -2;
1675  cs->ca[3] = -1;
1676  cs->ca[4] = -4;
1677  ok(sum_cs(cs) == 1, "RPC sum_cs\n");
1678  HeapFree(GetProcessHeap(), 0, cs);
1679 
1680  n = 5;
1681  cps.pn = &n;
1682  cps.ca1 = &c[2];
1683  cps.n = 3;
1684  cps.ca2 = &c[3];
1685  ok(sum_cps(&cps) == 53, "RPC sum_cps\n");
1686 
1687  cpsc.a = 4;
1688  cpsc.b = 5;
1689  cpsc.c = 1;
1690  cpsc.ca = c;
1691  ok(sum_cpsc(&cpsc) == 6, "RPC sum_cpsc\n");
1692  cpsc.a = 4;
1693  cpsc.b = 5;
1694  cpsc.c = 0;
1695  cpsc.ca = c;
1696  ok(sum_cpsc(&cpsc) == 10, "RPC sum_cpsc\n");
1697 
1698  cpsc.ca = NULL;
1699  ok(get_cpsc(5, &cpsc) == 45, "RPC sum_cpsc\n");
1700  ok( cpsc.a == 10, "RPC get_cpsc %u\n", cpsc.a );
1701  for (n = 0; n < 10; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] );
1702 
1703  memset( tmp, 0x33, sizeof(tmp) );
1704  cpsc.ca = tmp;
1705  ok(get_cpsc(4, &cpsc) == 28, "RPC sum_cpsc\n");
1706  ok( cpsc.a == 8, "RPC get_cpsc %u\n", cpsc.a );
1707  ok( cpsc.ca == tmp, "RPC get_cpsc %p/%p\n", cpsc.ca, tmp );
1708  for (n = 0; n < 8; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] );
1709 
1710  ok(sum_toplev_conf_2n(c, 3) == 15, "RPC sum_toplev_conf_2n\n");
1711  ok(sum_toplev_conf_cond(c, 5, 6, 1) == 10, "RPC sum_toplev_conf_cond\n");
1712  ok(sum_toplev_conf_cond(c, 5, 6, 0) == 15, "RPC sum_toplev_conf_cond\n");
1713 
1714  dc = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_t, a[2]));
1715  dc->n = 2;
1716  dc->a[0] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[3]));
1717  dc->a[0]->n = 3;
1718  dc->a[0]->a[0] = 5;
1719  dc->a[0]->a[1] = 1;
1720  dc->a[0]->a[2] = 8;
1721  dc->a[1] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[2]));
1722  dc->a[1]->n = 2;
1723  dc->a[1]->a[0] = 2;
1724  dc->a[1]->a[1] = 3;
1725  ok(sum_doub_carr(dc) == 19, "RPC sum_doub_carr\n");
1726  HeapFree(GetProcessHeap(), 0, dc->a[0]);
1727  HeapFree(GetProcessHeap(), 0, dc->a[1]);
1728  HeapFree(GetProcessHeap(), 0, dc);
1729 
1730  dc = NULL;
1731  make_pyramid_doub_carr(4, &dc);
1732  ok(check_pyramid_doub_carr(dc), "RPC make_pyramid_doub_carr\n");
1734 
1735  ok(sum_L1_norms(2, vs) == 21, "RPC sum_L1_norms\n");
1736 
1737  memset(api, 0, sizeof(api));
1738  pi = HeapAlloc(GetProcessHeap(), 0, sizeof(*pi));
1739  *pi = -1;
1740  api[0].pi = pi;
1741  get_numbers(1, 1, api);
1742  ok(api[0].pi == pi, "RPC conformant varying array [out] pointer changed from %p to %p\n", pi, api[0].pi);
1743  ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi);
1744 
1745  if (!old_windows_version)
1746  {
1747  ns = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(numbers_struct_t, numbers[5]));
1748  ns->length = 5;
1749  ns->size = 5;
1750  ns->numbers[0].pi = pi;
1751  get_numbers_struct(&ns);
1752  ok(ns->numbers[0].pi == pi, "RPC conformant varying struct embedded pointer changed from %p to %p\n", pi, ns->numbers[0].pi);
1753  ok(*ns->numbers[0].pi == 5, "pi unmarshalled incorrectly %d\n", *ns->numbers[0].pi);
1754  HeapFree(GetProcessHeap(), 0, ns);
1755  }
1756  HeapFree(GetProcessHeap(), 0, pi);
1757 
1758  pi = HeapAlloc(GetProcessHeap(), 0, 5 * sizeof(*pi));
1759  pi[0] = 3; rpi[0] = &pi[0];
1760  pi[1] = 5; rpi[1] = &pi[1];
1761  pi[2] = -2; rpi[2] = &pi[2];
1762  pi[3] = -1; rpi[3] = &pi[3];
1763  pi[4] = -4; rpi[4] = &pi[4];
1764  ok(sum_complex_array(5, rpi) == 1, "RPC sum_complex_array\n");
1765  HeapFree(GetProcessHeap(), 0, pi);
1766 
1767  ok(sum_ptr_array(ptr_array) == 3, "RPC sum_ptr_array\n");
1768  ok(sum_array_ptr(&array) == 7, "RPC sum_array_ptr\n");
1769 }
api
Definition: notification.c:37
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble n
Definition: glext.h:7729
static doub_carr_t ** dc
Definition: server.c:120
const GLfloat * m
Definition: glext.h:10848
uint32_t cs
Definition: isohybrid.c:75
smooth NULL
Definition: ftsmooth.c:416
static int n
Definition: server.c:72
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static refpint_t pi[]
Definition: server.c:96
static cpsc_t * cpsc
Definition: server.c:95
const GLubyte * c
Definition: glext.h:8905
Definition: mxnamespace.c:44
#define ok(value,...)
Definition: atltest.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
static void free_pyramid_doub_carr(doub_carr_t *dc)
Definition: server.c:1604
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
static const WCHAR ca[]
Definition: main.c:455
static BOOL old_windows_version
Definition: server.c:44
#define memset(x, y, z)
Definition: compat.h:39
static vector_t * vs
Definition: server.c:127
#define HeapFree(x, y, z)
Definition: compat.h:402
static int int int c
Definition: server.c:109
static int check_pyramid_doub_carr(doub_carr_t *dc)
Definition: server.c:1593

Referenced by run_tests().

◆ basic_tests()

static void basic_tests ( void  )
static

Definition at line 1121 of file server.c.

1122 {
1123  char string[] = "I am a string";
1124  WCHAR wstring[] = {'I',' ','a','m',' ','a',' ','w','s','t','r','i','n','g', 0};
1125  int f[5] = {1, 3, 0, -2, -4};
1126  vector_t a = {1, 3, 7};
1127  vector_t vec1 = {4, -2, 1}, vec2 = {-5, 2, 3}, *pvec2 = &vec2;
1128  pvectors_t pvecs = {&vec1, &pvec2};
1129  sp_inner_t spi = {42};
1130  sp_t sp = {-13, &spi};
1131  aligns_t aligns;
1132  pints_t pints;
1133  ptypes_t ptypes;
1134  padded_t padded;
1135  padded_t padded2[2];
1136  bogus_t bogus;
1137  int i1, i2, i3, *pi2, *pi3, **ppi3;
1138  double u, v;
1139  float s, t;
1140  LONG q, r;
1141  short h;
1142  char c;
1143  int x;
1144  hyper y;
1145  str_struct_t ss = {string};
1146  wstr_struct_t ws = {wstring};
1147  str_t str;
1148  se_t se;
1149  renum_t re;
1150 
1151  ok(int_return() == INT_CODE, "RPC int_return\n");
1152 
1153  ok(square(7) == 49, "RPC square\n");
1154  x = sum(23, -4);
1155  ok(x == 19, "RPC sum got %d\n", x);
1156  c = sum_char(-23, 50);
1157  ok(c == 27, "RPC sum_char got %d\n", (int)c);
1158  h = sum_short(1122, -344);
1159  ok(h == 778, "RPC sum_short got %d\n", (int)h);
1160  x = sum_float(123.45, -32.2);
1161  ok(x == 91, "RPC sum_float got %d\n", x);
1162  x = sum_double_int(-78, 148.46);
1163  ok(x == 70, "RPC sum_double_int got %d\n", x);
1164  y = sum_hyper((hyper)0x12345678 << 16, (hyper)0x33557799 << 16);
1165  ok(y == (hyper)0x4589ce11 << 16, "RPC hyper got %s\n", wine_dbgstr_longlong(y));
1166  x = sum_hyper_int((hyper)0x24242424 << 16, -((hyper)0x24241212 << 16));
1167  ok(x == 0x12120000, "RPC hyper_int got 0x%x\n", x);
1168  x = sum_char_hyper( 12, ((hyper)0x42424242 << 32) | 0x33334444 );
1169  ok(x == 0x33334450, "RPC char_hyper got 0x%x\n", x);
1170 
1171  x = 0;
1172  square_out(11, &x);
1173  ok(x == 121, "RPC square_out\n");
1174 
1175  x = 5;
1176  square_ref(&x);
1177  ok(x == 25, "RPC square_ref\n");
1178 
1179  ok(str_length(string) == strlen(string), "RPC str_length\n");
1180  ok(str_t_length(string) == strlen(string), "RPC str_length\n");
1181  ok(dot_self(&a) == 59, "RPC dot_self\n");
1182 
1183  ok(str_struct_len(&ss) == lstrlenA(string), "RPC str_struct_len\n");
1184  ok(wstr_struct_len(&ws) == lstrlenW(wstring), "RPC str_struct_len\n");
1185 
1186  v = 0.0;
1187  u = square_half(3.0, &v);
1188  ok(u == 9.0, "RPC square_half\n");
1189  ok(v == 1.5, "RPC square_half\n");
1190 
1191  t = 0.0f;
1192  s = square_half_float(3.0f, &t);
1193  ok(s == 9.0f, "RPC square_half_float\n");
1194  ok(t == 1.5f, "RPC square_half_float\n");
1195 
1196  r = 0;
1197  q = square_half_long(3, &r);
1198  ok(q == 9, "RPC square_half_long\n");
1199  ok(r == 1, "RPC square_half_long\n");
1200 
1201  i1 = 19;
1202  i2 = -3;
1203  i3 = -29;
1204  pi2 = &i2;
1205  pi3 = &i3;
1206  ppi3 = &pi3;
1207  pints.pi = &i1;
1208  pints.ppi = &pi2;
1209  pints.pppi = &ppi3;
1210  ok(pints_sum(&pints) == -13, "RPC pints_sum\n");
1211 
1212  c = 10;
1213  h = 3;
1214  q = 14;
1215  s = -5.0f;
1216  u = 11.0;
1217  ptypes.pc = &c;
1218  ptypes.ps = &h;
1219  ptypes.pl = &q;
1220  ptypes.pf = &s;
1221  ptypes.pd = &u;
1222  ok(ptypes_sum(&ptypes) == 33.0, "RPC ptypes_sum\n");
1223 
1224  ok(dot_pvectors(&pvecs) == -21, "RPC dot_pvectors\n");
1225  ok(dot_copy_vectors(vec1, vec2) == -21, "RPC dot_copy_vectors\n");
1226  ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n");
1227  ok(sum_sp(&sp) == 29, "RPC sum_sp\n");
1228 
1229  ok(enum_ord(E1) == 1, "RPC enum_ord\n");
1230  ok(enum_ord(E2) == 2, "RPC enum_ord\n");
1231  ok(enum_ord(E3) == 3, "RPC enum_ord\n");
1232  ok(enum_ord(E4) == 4, "RPC enum_ord\n");
1233 
1234  se.f = E2;
1235  check_se2(&se);
1236 
1237  memset(&aligns, 0, sizeof(aligns));
1238  aligns.c = 3;
1239  aligns.i = 4;
1240  aligns.s = 5;
1241  aligns.d = 6.0;
1242  ok(sum_aligns(&aligns) == 18.0, "RPC sum_aligns\n");
1243 
1244  padded.i = -3;
1245  padded.c = 8;
1246  ok(sum_padded(&padded) == 5, "RPC sum_padded\n");
1247  padded2[0].i = -5;
1248  padded2[0].c = 1;
1249  padded2[1].i = 3;
1250  padded2[1].c = 7;
1251  ok(sum_padded2(padded2) == 6, "RPC sum_padded2\n");
1252  padded2[0].i = -5;
1253  padded2[0].c = 1;
1254  padded2[1].i = 3;
1255  padded2[1].c = 7;
1256  ok(sum_padded_conf(padded2, 2) == 6, "RPC sum_padded_conf\n");
1257 
1258  i1 = 14;
1259  i2 = -7;
1260  i3 = -4;
1261  bogus.h.p1 = &i1;
1262  bogus.p2 = &i2;
1263  bogus.p3 = &i3;
1264  bogus.c = 9;
1265  ok(sum_bogus(&bogus) == 12, "RPC sum_bogus\n");
1266 
1267  check_null(NULL);
1268 
1269  if (!is_interp || sizeof(void*) != 8) { /* broken in widl for win64 */
1270  str = get_filename();
1271  ok(!strcmp(str, __FILE__), "get_filename() returned %s instead of %s\n", str, __FILE__);
1273  }
1274 
1275  x = echo_ranged_int(0,0,0);
1276  ok(x == 0, "echo_ranged_int() returned %d instead of 0\n", x);
1277  x = echo_ranged_int(10,20,100);
1278  ok(x == 100, "echo_ranged_int() returned %d instead of 100\n", x);
1279  x = echo_ranged_int2(40);
1280  ok(x == 40, "echo_ranged_int() returned %d instead of 40\n", x);
1281 
1282  if (!old_windows_version)
1283  {
1284  re = 0xdeadbeef;
1285  get_ranged_enum(&re);
1286  ok(re == RE3 ||
1287  broken(re == MAKELONG(re, 0xdead)), /* Win 8, Win 10 */
1288  "get_ranged_enum() returned %x instead of RE3\n", re);
1289  }
1290 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
static str_t(__cdecl *get_filename)(void)
const char * ws
Definition: skip_ws.cpp:7
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble t
Definition: gl.h:2047
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define lstrlenW
Definition: compat.h:415
INT64 hyper
Definition: rpcndr.h:117
#define INT_CODE
Definition: server.c:41
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
long LONG
Definition: pedump.c:60
static const WCHAR * get_filename(const WCHAR *name, const WCHAR *endptr)
Definition: module.c:68
const WCHAR * str
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
GLfloat f
Definition: glext.h:7540
__wchar_t WCHAR
Definition: xmlstorage.h:180
const GLubyte * c
Definition: glext.h:8905
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLdouble s
Definition: gl.h:2039
static BOOL is_interp
Definition: server.c:245
#define broken(x)
Definition: _sntprintf.h:21
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
const GLdouble * v
Definition: gl.h:2040
static vector_t v
Definition: server.c:100
#define ok(value,...)
Definition: atltest.h:57
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static int y
Definition: server.c:60
static const WCHAR sp[]
Definition: suminfo.c:288
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define ss
Definition: i386-dis.c:432
static BOOL old_windows_version
Definition: server.c:44
#define memset(x, y, z)
Definition: compat.h:39
static int int int c
Definition: server.c:109
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: server.c:75

Referenced by basic_tests_thread(), run_tests(), and test_reconnect().

◆ basic_tests_thread()

static DWORD WINAPI basic_tests_thread ( void arg)
static

Definition at line 2308 of file server.c.

2309 {
2310  basic_tests();
2311  return 0;
2312 }
static void basic_tests(void)
Definition: server.c:1121

Referenced by test_reconnect().

◆ bstr_t_UserFree()

void __RPC_USER bstr_t_UserFree ( ULONG flags,
bstr_t b 
)

Definition at line 1466 of file server.c.

1467 {
1468  HeapFree(GetProcessHeap(), 0, &((*b)[-1]));
1469 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:403
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ bstr_t_UserMarshal()

unsigned char* __RPC_USER bstr_t_UserMarshal ( ULONG flags,
unsigned char buffer,
bstr_t b 
)

Definition at line 1446 of file server.c.

1447 {
1448  wire_bstr_t wb = (wire_bstr_t) buffer;
1449  wb->n = (*b)[-1];
1450  memcpy(&wb->data, *b, wb->n * sizeof wb->data[0]);
1451  return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]);
1452 }
GLuint buffer
Definition: glext.h:5915
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ bstr_t_UserSize()

ULONG __RPC_USER bstr_t_UserSize ( ULONG flags,
ULONG  start,
bstr_t b 
)

Definition at line 1440 of file server.c.

1441 {
1442  return start + FIELD_OFFSET(user_bstr_t, data[(*b)[-1]]);
1443 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint start
Definition: gl.h:1545
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ bstr_t_UserUnmarshal()

unsigned char* __RPC_USER bstr_t_UserUnmarshal ( ULONG flags,
unsigned char buffer,
bstr_t b 
)

Definition at line 1455 of file server.c.

1456 {
1457  wire_bstr_t wb = (wire_bstr_t) buffer;
1458  short *data = HeapAlloc(GetProcessHeap(), 0, (wb->n + 1) * sizeof *data);
1459  data[0] = wb->n;
1460  memcpy(&data[1], wb->data, wb->n * sizeof data[1]);
1461  *b = &data[1];
1462  return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]);
1463 }
GLuint buffer
Definition: glext.h:5915
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ char()

static signed char ( __cdecl sum_char)
static

◆ check_pyramid_doub_carr()

static int check_pyramid_doub_carr ( doub_carr_t *  dc)
static

Definition at line 1593 of file server.c.

1594 {
1595  int i, j;
1596  for (i = 0; i < dc->n; ++i)
1597  for (j = 0; j < dc->a[i]->n; ++j)
1598  if (dc->a[i]->a[j] != j + 1)
1599  return FALSE;
1600  return TRUE;
1601 }
#define TRUE
Definition: types.h:120
static int j
Definition: server.c:132
static doub_carr_t ** dc
Definition: server.c:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by array_tests().

◆ client()

static void client ( const char test)
static

Definition at line 1901 of file server.c.

1902 {
1903  static unsigned char iptcp[] = "ncacn_ip_tcp";
1904  static unsigned char np[] = "ncacn_np";
1905  static unsigned char ncalrpc[] = "ncalrpc";
1906  static unsigned char address[] = "127.0.0.1";
1907  static unsigned char address_np[] = "\\\\.";
1908  static unsigned char port[] = PORT;
1909  static unsigned char pipe[] = PIPE;
1910  static unsigned char guid[] = "00000000-4114-0704-2301-000000000000";
1911 
1912  unsigned char *binding;
1913 
1914  if (strcmp(test, "tcp_basic") == 0)
1915  {
1916  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
1917  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1918 
1919  run_tests();
1920  authinfo_test(RPC_PROTSEQ_TCP, 0);
1921  test_is_server_listening2(IMixedServer_IfHandle, RPC_S_OK, RPC_S_ACCESS_DENIED);
1922 
1923  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1924  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1925  }
1926  else if (strcmp(test, "tcp_secure") == 0)
1927  {
1928  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
1929  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1930 
1931  set_auth_info(IMixedServer_IfHandle);
1932  authinfo_test(RPC_PROTSEQ_TCP, 1);
1933  test_is_server_listening(IMixedServer_IfHandle, RPC_S_ACCESS_DENIED);
1934 
1935  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1936  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1937  }
1938  else if (strcmp(test, "ncalrpc_basic") == 0)
1939  {
1940  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1941  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1942 
1943  run_tests(); /* can cause RPC_X_BAD_STUB_DATA exception */
1944  authinfo_test(RPC_PROTSEQ_LRPC, 0);
1945  test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK);
1946 
1947  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1948  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1949  }
1950  else if (strcmp(test, "ncalrpc_autolisten") == 0)
1951  {
1952  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1953  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1954 
1955  run_tests();
1956  authinfo_test(RPC_PROTSEQ_LRPC, 0);
1957 todo_wine
1958  test_is_server_listening(IMixedServer_IfHandle, RPC_S_NOT_LISTENING);
1959 
1960  stop_autolisten();
1961  ok(int_return() == INT_CODE, "RPC int_return\n");
1962 
1963  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1964  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1965  }
1966  else if (strcmp(test, "ncalrpc_secure") == 0)
1967  {
1968  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1969  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1970 
1971  set_auth_info(IMixedServer_IfHandle);
1972  authinfo_test(RPC_PROTSEQ_LRPC, 1);
1973  test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK);
1974 
1975  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1976  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1977  }
1978  else if (strcmp(test, "np_basic") == 0)
1979  {
1980  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n");
1981  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n");
1982 
1983  test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK);
1984  run_tests();
1985  authinfo_test(RPC_PROTSEQ_NMP, 0);
1986  test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK);
1987  stop();
1988  test_is_server_listening(IMixedServer_IfHandle, RPC_S_NOT_LISTENING);
1989 
1990  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1991  ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n");
1992  }
1993  else if (strcmp(test, "np_basic_interp") == 0)
1994  {
1996 
1997  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n");
1998  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IInterpServer_IfHandle), "RpcBindingFromStringBinding\n");
1999 
2000  test_is_server_listening(IInterpServer_IfHandle, RPC_S_OK);
2001  run_tests();
2002  authinfo_test(RPC_PROTSEQ_NMP, 0);
2003  test_is_server_listening(IInterpServer_IfHandle, RPC_S_OK);
2004 
2005  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
2006  ok(RPC_S_OK == RpcBindingFree(&IInterpServer_IfHandle), "RpcBindingFree\n");
2007  }
2008 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
#define test_is_server_listening(a, b)
Definition: server.c:1880
RPC_STATUS WINAPI RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:457
#define test
Definition: rosglue.h:37
#define RPC_PROTSEQ_LRPC
Definition: rpcdce.h:127
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:158
#define INT_CODE
Definition: server.c:41
#define RPC_S_ACCESS_DENIED
Definition: rpcnterr.h:29
#define test_is_server_listening2(a, b, c)
Definition: server.c:1889
const GUID * guid
#define PORT
Definition: server.c:38
smooth NULL
Definition: ftsmooth.c:416
#define PIPE
Definition: server.c:39
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1026
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:836
static void set_interp_interface(void)
Definition: server.c:247
static void set_auth_info(RPC_BINDING_HANDLE handle)
Definition: server.c:1865
GLuint address
Definition: glext.h:9393
#define todo_wine
Definition: test.h:163
static void run_tests(void)
Definition: server.c:1854
#define RPC_PROTSEQ_TCP
Definition: rpcdce.h:125
#define ok(value,...)
Definition: atltest.h:57
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
USHORT port
Definition: uri.c:228
#define RPC_PROTSEQ_NMP
Definition: rpcdce.h:126
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by START_TEST().

◆ create_server_process()

static HANDLE create_server_process ( void  )
static

Definition at line 2249 of file server.c.

2250 {
2251  SECURITY_ATTRIBUTES sec_attr = { sizeof(sec_attr), NULL, TRUE };
2252  HANDLE ready_event;
2253  char cmdline[MAX_PATH];
2256  DWORD ret;
2257 
2258  memset(&startup, 0, sizeof startup);
2259  startup.cb = sizeof startup;
2260 
2261  ready_event = CreateEventW(&sec_attr, TRUE, FALSE, NULL);
2262  ok(ready_event != NULL, "CreateEvent failed: %u\n", GetLastError());
2263 
2264  sprintf(cmdline, "%s server run %lx", progname, (UINT_PTR)ready_event);
2265  trace("running server process...\n");
2266  ok(CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n");
2267  ret = WaitForSingleObject(ready_event, 10000);
2268  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
2269 
2270  ok(CloseHandle(info.hThread), "CloseHandle\n");
2271  ok(CloseHandle(ready_event), "CloseHandle\n");
2272  return info.hProcess;
2273 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int startup(int argc, const char *argv[])
Definition: startup.c:430
TCHAR * cmdline
Definition: stretchblt.cpp:32
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
struct _test_info info[]
Definition: SetCursorPos.c:19
#define sprintf(buf, format,...)
Definition: sprintf.c:55
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
smooth NULL
Definition: ftsmooth.c:416
static const char * progname
Definition: server.c:43
#define WAIT_OBJECT_0
Definition: winbase.h:387
#define trace
Definition: atltest.h:70
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4742
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
int ret
static const WCHAR L[]
Definition: oid.c:1250
#define ok(value,...)
Definition: atltest.h:57
#define memset(x, y, z)
Definition: compat.h:39

Referenced by test_reconnect().

◆ ctx_handle_t()

static ctx_handle_t ( __cdecl get_handle)
static

◆ ctx_handle_t_rundown()

void __RPC_USER ctx_handle_t_rundown ( ctx_handle_t  ctx_handle)

Definition at line 1092 of file server.c.

1093 {
1094  ok(ctx_handle == (ctx_handle_t)0xdeadbeef, "Unexpected ctx_handle %p\n", ctx_handle);
1095 }
static ctx_handle_t(__cdecl *get_handle)(void)
#define ok(value,...)
Definition: atltest.h:57

◆ double()

static double ( __cdecl square_half)
static

◆ float()

static float ( __cdecl square_half_float)
static

Referenced by __string_to_float(), alpha_test_arbfp(), AVISplitter_ProcessStreamList(), basetype_arg_size(), calc_wheel_change(), color_to_float(), ComplexMarshall(), ComplexUnmarshall(), conv_s16_to_f32(), convert_fixed_to_float(), d3drm_viewport2_Init(), d3dx9_sprite_Flush(), d3dx_set_shader_const_state(), D3DXCreateTextW(), dct64_altivec(), ddraw_surface_blt_clipped(), BtrfsRecv::do_recv(), DrawBackgroundPreview(), EDIT_BuildLineDefs_ML(), EDIT_WindowProc(), EmbeddedComplexSize(), empty_image(), emptyImage3D(), extract1010102(), extract1555rev(), extract2101010rev(), extract233rev(), extract332(), extract4444(), extract4444rev(), extract5551(), extract565(), extract565rev(), extract8888(), extract8888rev(), fb_copy_to_texture_direct(), float_16_to_32(), float_24_to_32(), for(), format_bytes(), format_size(), format_to_vec4(), fromfixedpoint(), audio_membuffer::fseconds_recorded(), audio_membuffer::fseconds_total(), get_flexible_vertex_size(), gl_Accum(), gl_clear_accum_buffer(), gluCylinder(), gluPartialDisk(), halve1Dimage_int(), halve1DimagePackedPixel(), halveImage_int(), halveImagePackedPixel(), halveImagePackedPixel3D(), halveImagePackedPixelSlice(), InitGL(), isInRefBlackWhiteRange(), linear_vari_process(), LISTBOX_HandleMouseWheel(), hashtable< _Value, _Value, _HashFcn, _UnorderedMultisetTraits, _STLP_PRIV _Identity< _Value >, _EqualKey, _Alloc >::load_factor(), metafile_get_pen_brush_data_offset(), METAFILE_PlaybackObject(), modff(), NdrBaseTypeMemorySize(), normalize(), number_from_string(), number_with_units(), audio_resampler_acm::open(), pack_strided_data(), parse_new_id3(), process_comment(), process_extra(), process_vertices_strided(), BtrfsScrub::RefreshScrubDlg(), render(), CWineTest::RunTest(), audio_format::samples_in_seconds(), scale_internal(), scale_internal_byte(), scale_internal_float(), scale_internal_int(), scale_internal_short(), scale_internal_ubyte(), scale_internal_uint(), scale_internal_ushort(), scaleInternal3D(), scaleInternalPackedPixel(), ScreenSaverProc(), ScriptCPtoX(), ScriptXtoCP(), BtrfsPropSheet::set_size_on_disk(), shader_arb_ps_local_constants(), shader_arb_vs_local_constants(), shader_glsl_load_constants(), sinc_mono_vari_process(), src_int_to_float_array(), src_short_to_float_array(), state_alpha_test(), state_depthbias(), synth_1to1_altivec(), synth_1to1_fltst_altivec(), synth_1to1_real_altivec(), synth_1to1_s32_altivec(), synth_1to1_s32_stereo_altivec(), synth_1to1_stereo_altivec(), test_buffer(), test_buffer8(), test_EnumForms(), test_propertybag_write(), test_ScCountProps(), test_UlPropSize(), texture2d_get_blt_info(), texture_init(), TIFFCIELabToRGBInit(), TIFFCIELabToXYZ(), TIFFDefaultRefBlackWhite(), TIFFReadDirEntryFloat(), TIFFReadDirEntryFloatArray(), TREEVIEW_MouseWheel(), UlPropSize(), units_to_twips(), update_filter(), update_preview_sizes(), BtrfsScrub::UpdateTextBox(), VarFix(), VARIANT_DataSize(), VarInt(), VMR9_SurfaceAllocator_UpdateDeviceReset(), wave_generate_la(), wglUseFontOutlines_common(), wine_glFogi(), wine_glFogiv(), wined3d_clip_blit(), wined3d_device_set_light(), wined3d_shader_set_local_constants_float(), wmain(), WndProc(), and xsltParseStylesheetTemplate().

◆ free_list()

static void free_list ( test_list_t *  list)
static

Definition at line 1371 of file server.c.

1372 {
1373  if (list->t == TL_LIST)
1374  free_list(list->u.tail);
1375  HeapFree(GetProcessHeap(), 0, list);
1376 }
static void free_list(test_list_t *list)
Definition: server.c:1371
#define GetProcessHeap()
Definition: compat.h:403
#define TL_LIST
Definition: _list.h:228
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by pointer_tests().

◆ free_pyramid_doub_carr()

static void free_pyramid_doub_carr ( doub_carr_t *  dc)
static

Definition at line 1604 of file server.c.

1605 {
1606  int i;
1607  for (i = 0; i < dc->n; ++i)
1608  MIDL_user_free(dc->a[i]);
1609  MIDL_user_free(dc);
1610 }
static doub_carr_t ** dc
Definition: server.c:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376

Referenced by array_tests().

◆ get_s123()

static s123_t* __cdecl* get_s123 ( void  )
static

Referenced by pointer_tests().

◆ hyper()

static hyper ( __cdecl sum_hyper)
static

◆ InitFunctionPointers()

static void InitFunctionPointers ( void  )
static

Definition at line 265 of file server.c.

266 {
267  HMODULE hrpcrt4 = GetModuleHandleA("rpcrt4.dll");
268 
269  pNDRSContextMarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextMarshall2");
270  pNDRSContextUnmarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextUnmarshall2");
271  pRpcServerRegisterIfEx = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterIfEx");
272  pRpcBindingSetAuthInfoExA = (void *)GetProcAddress(hrpcrt4, "RpcBindingSetAuthInfoExA");
273  pRpcServerRegisterAuthInfoA = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterAuthInfoA");
274 
275  if (!pNDRSContextMarshall2) old_windows_version = TRUE;
276 }
#define TRUE
Definition: types.h:120
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define GetProcAddress(x, y)
Definition: compat.h:418
static BOOL old_windows_version
Definition: server.c:44

Referenced by START_TEST().

◆ int()

static int ( __cdecl int_return)
static

◆ is_firewall_enabled()

static BOOL is_firewall_enabled ( void  )
static

Definition at line 2377 of file server.c.

2378 {
2379  HRESULT hr, init;
2380  INetFwMgr *mgr = NULL;
2381  INetFwPolicy *policy = NULL;
2383  VARIANT_BOOL enabled = VARIANT_FALSE;
2384 
2386 
2387  hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
2388  (void **)&mgr );
2389  ok( hr == S_OK, "got %08x\n", hr );
2390  if (hr != S_OK) goto done;
2391 
2392  hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
2393  ok( hr == S_OK, "got %08x\n", hr );
2394  if (hr != S_OK) goto done;
2395 
2396  hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
2397  if (hr != S_OK) goto done;
2398 
2399  hr = INetFwProfile_get_FirewallEnabled( profile, &enabled );
2400  ok( hr == S_OK, "got %08x\n", hr );
2401 
2402 done:
2403  if (policy) INetFwPolicy_Release( policy );
2404  if (profile) INetFwProfile_Release( profile );
2405  if (mgr) INetFwMgr_Release( mgr );
2406  if (SUCCEEDED( init )) CoUninitialize();
2407  return (enabled == VARIANT_TRUE);
2408 }
HRESULT hr
Definition: shlfolder.c:183
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
short VARIANT_BOOL
Definition: compat.h:1939
static int init
Definition: wintirpc.c:33
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define ok(value,...)
Definition: atltest.h:57
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
#define profile
Definition: kernel32.h:12
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by START_TEST().

◆ is_process_elevated()

static BOOL is_process_elevated ( void  )
static

Definition at line 2361 of file server.c.

2362 {
2363  HANDLE token;
2365  {
2367  DWORD size;
2368  BOOL ret;
2369 
2371  CloseHandle( token );
2372  return (ret && type == TokenElevationTypeFull);
2373  }
2374  return FALSE;
2375 }
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
#define CloseHandle
Definition: compat.h:406
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static int size
Definition: server.c:129
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
GLsizeiptr size
Definition: glext.h:5919
#define TOKEN_QUERY
Definition: setypes.h:874
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:413

Referenced by START_TEST().

◆ listen_test_client_thread()

static DWORD WINAPI listen_test_client_thread ( void binding)
static

Definition at line 2120 of file server.c.

2121 {
2123 
2124  status = RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle);
2125  ok(status == RPC_S_OK, "RpcBindingFromStringBinding\n");
2126 
2127  test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK);
2128  stop();
2129  trace("stopped\n");
2130 
2131  status = RpcBindingFree(&IMixedServer_IfHandle);
2132  ok(status == RPC_S_OK, "RpcBindingFree\n");
2133  return 0;
2134 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
#define test_is_server_listening(a, b)
Definition: server.c:1880
long RPC_STATUS
Definition: rpc.h:52
#define trace
Definition: atltest.h:70
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:836
#define ok(value,...)
Definition: atltest.h:57
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by test_stop_wait_for_call().

◆ LONG()

static LONG ( __cdecl square_half_long)
static

◆ make_cmdline()

static void make_cmdline ( char  buffer[MAX_PATH],
const char test 
)
static

Definition at line 1098 of file server.c.

1099 {
1100  sprintf(buffer, "%s server %s", progname, test);
1101 }
GLuint buffer
Definition: glext.h:5915
#define test
Definition: rosglue.h:37
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static const char * progname
Definition: server.c:43

Referenced by run_client().

◆ make_list()

static test_list_t* make_list ( test_list_t *  tail)
static

Definition at line 1362 of file server.c.

1363 {
1364  test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
1365  n->t = TL_LIST;
1366  n->u.tail = tail;
1367  return n;
1368 }
struct outqueuenode * tail
Definition: adnsresfilter.c:66
GLdouble n
Definition: glext.h:7729
static int n
Definition: server.c:72
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define TL_LIST

Referenced by pointer_tests().

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  n)

Definition at line 279 of file server.c.

280 {
281  return HeapAlloc(GetProcessHeap(), 0, n);
282 }
GLdouble n
Definition: glext.h:7729
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR p)

Definition at line 285 of file server.c.

286 {
287  HeapFree(GetProcessHeap(), 0, p);
288 }
#define GetProcessHeap()
Definition: compat.h:403
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ NDR_SCONTEXT()

static NDR_SCONTEXT ( WINAPI pNDRSContextUnmarshall2)
static

◆ null_list()

static test_list_t* null_list ( void  )
static

Definition at line 1353 of file server.c.

1354 {
1355  test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
1356  n->t = TL_NULL;
1357  n->u.x = 0;
1358  return n;
1359 }
GLdouble n
Definition: glext.h:7729
static int n
Definition: server.c:72
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define TL_NULL

Referenced by pointer_tests().

◆ pointer_tests()

static void pointer_tests ( void  )
static

Definition at line 1472 of file server.c.

1473 {
1474  int a[] = {1, 2, 3, 4};
1475  char p1[] = "11";
1476  test_list_t *list = make_list(make_list(make_list(null_list())));
1477  test_us_t tus = {{p1}};
1478  int *pa[4];
1479  puints_t pus;
1480  cpuints_t cpus;
1481  short bstr_data[] = { 5, 'H', 'e', 'l', 'l', 'o' };
1482  bstr_t bstr = &bstr_data[1], bstr2;
1483  name_t name;
1484  void *buffer;
1485  int *pa2;
1486  s123_t *s123;
1487  int val = 42;
1488 
1489  ok(test_list_length(list) == 3, "RPC test_list_length\n");
1490  ok(square_puint(p1) == 121, "RPC square_puint\n");
1491  pus.n = 4;
1492  pus.ps = HeapAlloc(GetProcessHeap(), 0, pus.n * sizeof pus.ps[0]);
1493  pus.ps[0] = xstrdup("5");
1494  pus.ps[1] = xstrdup("6");
1495  pus.ps[2] = xstrdup("7");
1496  pus.ps[3] = xstrdup("8");
1497  ok(sum_puints(&pus) == 26, "RPC sum_puints\n");
1498  HeapFree(GetProcessHeap(), 0, pus.ps[0]);
1499  HeapFree(GetProcessHeap(), 0, pus.ps[1]);
1500  HeapFree(GetProcessHeap(), 0, pus.ps[2]);
1501  HeapFree(GetProcessHeap(), 0, pus.ps[3]);
1502  HeapFree(GetProcessHeap(), 0, pus.ps);
1503  cpus.n = 4;
1504  cpus.ps = HeapAlloc(GetProcessHeap(), 0, cpus.n * sizeof cpus.ps[0]);
1505  cpus.ps[0] = xstrdup("5");
1506  cpus.ps[1] = xstrdup("6");
1507  cpus.ps[2] = xstrdup("7");
1508  cpus.ps[3] = xstrdup("8");
1509  ok(sum_cpuints(&cpus) == 26, "RPC sum_puints\n");
1510  HeapFree(GetProcessHeap(), 0, cpus.ps[0]);
1511  HeapFree(GetProcessHeap(), 0, cpus.ps[1]);
1512  HeapFree(GetProcessHeap(), 0, cpus.ps[2]);
1513  HeapFree(GetProcessHeap(), 0, cpus.ps[3]);
1514  HeapFree(GetProcessHeap(), 0, cpus.ps);
1515  ok(square_test_us(&tus) == 121, "RPC square_test_us\n");
1516 
1517  pa[0] = &a[0];
1518  pa[1] = &a[1];
1519  pa[2] = &a[2];
1520  ok(sum_parr(pa) == 6, "RPC sum_parr\n");
1521 
1522  pa[0] = &a[0];
1523  pa[1] = &a[1];
1524  pa[2] = &a[2];
1525  pa[3] = &a[3];
1526  ok(sum_pcarr(pa, 4) == 10, "RPC sum_pcarr\n");
1527 
1528  ok(hash_bstr(bstr) == s_hash_bstr(bstr), "RPC hash_bstr_data\n");
1529 
1530  get_a_bstr(&bstr);
1531  s_get_a_bstr(&bstr2);
1532  ok(!lstrcmpW((LPCWSTR)bstr, (LPCWSTR)bstr2), "bstr mismatch\n");
1533  HeapFree(GetProcessHeap(), 0, bstr - 1);
1534  HeapFree(GetProcessHeap(), 0, bstr2 - 1);
1535 
1536  free_list(list);
1537 
1538  if (!old_windows_version)
1539  {
1540  int n;
1541  str_array_t names;
1542  wstr_array_t namesw;
1543 
1544  name.size = 10;
1546  get_name(&name);
1547  ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
1548  ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name);
1550 
1551  if (!is_interp) { /* broken in widl */
1552  n = -1;
1553  names = NULL;
1554  get_names(&n, &names);
1555  ok(n == 2, "expected 2, got %d\n", n);
1557  ok(!strcmp(names[0], "Hello"), "expected Hello, got %s\n", names[0]);
1559  ok(!strcmp(names[1], "World!"), "expected World!, got %s\n", names[1]);
1560  MIDL_user_free(names[0]);
1561  MIDL_user_free(names[1]);
1563 
1564  n = -1;
1565  namesw = NULL;
1566  get_namesw(&n, &namesw);
1567  ok(n == 2, "expected 2, got %d\n", n);
1569  ok(!lstrcmpW(namesw[0], helloW), "expected Hello, got %s\n", wine_dbgstr_w(namesw[0]));
1571  ok(!lstrcmpW(namesw[1], worldW), "expected World!, got %s\n", wine_dbgstr_w(namesw[1]));
1572  MIDL_user_free(namesw[0]);
1573  MIDL_user_free(namesw[1]);
1574  MIDL_user_free(namesw);
1575  }
1576  }
1577 
1578  if (!is_interp) { /* broken in widl */
1579  pa2 = a;
1581  ok(sum_pcarr2(4, &pa2) == 10, "RPC sum_pcarr2\n");
1582  }
1583 
1584  s123 = get_s123();
1585  ok(s123->f1 == 1 && s123->f2 == 2 && s123->f3 == 3, "RPC get_s123\n");
1586  MIDL_user_free(s123);
1587 
1588  full_pointer_test(&val, &val);
1589  full_pointer_null_test(&val, NULL);
1590 }
static const WCHAR helloW[]
Definition: server.c:242
void __cdecl s_get_a_bstr(bstr_t *b)
Definition: server.c:763
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
static test_list_t * null_list(void)
Definition: server.c:1353
static test_list_t * make_list(test_list_t *tail)
Definition: server.c:1362
GLuint GLuint * names
Definition: glext.h:11545
static s123_t *__cdecl * get_s123(void)
int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
Definition: util.c:55
static void free_list(test_list_t *list)
Definition: server.c:1371
Definition: oleaut.c:84
smooth NULL
Definition: ftsmooth.c:416
GLuint GLfloat * val
Definition: glext.h:7180
static int n
Definition: server.c:72
static int ** pa
Definition: server.c:126
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static char * xstrdup(const char *s)
Definition: server.c:291
unsigned __cdecl s_hash_bstr(bstr_t b)
Definition: server.c:752
Definition: _list.h:228
static const WCHAR worldW[]
Definition: server.c:243
static int a
Definition: server.c:109
static BOOL is_interp
Definition: server.c:245
#define ros_skip_flaky
Definition: test.h:167
#define ok(value,...)
Definition: atltest.h:57
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: name.c:38
static str_array_t * names
Definition: server.c:124
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
static BOOL old_windows_version
Definition: server.c:44
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376
#define HeapFree(x, y, z)
Definition: compat.h:402
WCHAR * name
Definition: name.c:42
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by run_tests().

◆ puint_t_UserFree()

void __RPC_USER puint_t_UserFree ( ULONG flags,
puint_t *  p 
)

Definition at line 1403 of file server.c.

1404 {
1405  HeapFree(GetProcessHeap(), 0, *p);
1406 }
#define GetProcessHeap()
Definition: compat.h:403
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ puint_t_UserMarshal()

unsigned char* __RPC_USER puint_t_UserMarshal ( ULONG flags,
unsigned char buffer,
puint_t *  p 
)

Definition at line 1385 of file server.c.

1386 {
1387  int n = atoi(*p);
1388  memcpy(buffer, &n, sizeof n);
1389  return buffer + sizeof n;
1390 }
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
static int n
Definition: server.c:72
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ puint_t_UserSize()

ULONG __RPC_USER puint_t_UserSize ( ULONG flags,
ULONG  start,
puint_t *  p 
)

Definition at line 1379 of file server.c.

1380 {
1381  return start + sizeof(int);
1382 }
GLuint start
Definition: gl.h:1545
static UUID RPC_MGR_EPV unsigned int
Definition: server.c:50

◆ puint_t_UserUnmarshal()

unsigned char* __RPC_USER puint_t_UserUnmarshal ( ULONG flags,
unsigned char buffer,
puint_t *  p 
)

Definition at line 1393 of file server.c.

1394 {
1395  int n;
1396  memcpy(&n, buffer, sizeof n);
1397  *p = HeapAlloc(GetProcessHeap(), 0, 10);
1398  sprintf(*p, "%d", n);
1399  return buffer + sizeof n;
1400 }
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static int n
Definition: server.c:72
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLfloat GLfloat p
Definition: glext.h:8902

◆ rint_t()

static rint_t ( __cdecl echo_ranged_int)
static

◆ RPC_STATUS()

static RPC_STATUS ( WINAPI pRpcServerRegisterIfEx)
static

◆ run_client()

static void run_client ( const char test)
static

Definition at line 1104 of file server.c.

1105 {
1106  char cmdline[MAX_PATH];
1109 
1110  memset(&startup, 0, sizeof startup);
1111  startup.cb = sizeof startup;
1112 
1114  ok(CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n");
1115  winetest_wait_child_process( info.hProcess );
1116  ok(CloseHandle(info.hProcess), "CloseHandle\n");
1117  ok(CloseHandle(info.hThread), "CloseHandle\n");
1118 }
#define CloseHandle
Definition: compat.h:406
int startup(int argc, const char *argv[])
Definition: startup.c:430
#define test
Definition: rosglue.h:37
TCHAR * cmdline
Definition: stretchblt.cpp:32
struct _test_info info[]
Definition: SetCursorPos.c:19
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4742
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
void winetest_wait_child_process(HANDLE process)
#define ok(value,...)
Definition: atltest.h:57
static void make_cmdline(char buffer[MAX_PATH], const char *test)
Definition: server.c:1098
#define memset(x, y, z)
Definition: compat.h:39

Referenced by server(), and START_TEST().

◆ run_server()

static void run_server ( HANDLE  ready_event)
static

Definition at line 2275 of file server.c.

2276 {
2277  static unsigned char np[] = "ncacn_np";
2278  static unsigned char pipe[] = PIPE "term_test";
2280  BOOL ret;
2281 
2282  status = RpcServerUseProtseqEpA(np, 0, pipe, NULL);
2283  ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", status);
2284 
2285  status = RpcServerRegisterIf(s_IMixedServer_v0_0_s_ifspec, NULL, NULL);
2286  ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status);
2287 
2289  status = RpcServerListen(1, 20, TRUE);
2290  ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status);
2291 
2293  ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError());
2294 
2295  ret = SetEvent(ready_event);
2296  ok(ret, "SetEvent failed: %u\n", GetLastError());
2297 
2299  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
2300 
2302  ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status);
2303 
2305  stop_event = NULL;
2306 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
#define test_is_server_listening(a, b)
Definition: server.c:1880
static HANDLE stop_event
Definition: server.c:46
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
long RPC_STATUS
Definition: rpc.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1520
smooth NULL
Definition: ftsmooth.c:416
#define PIPE
Definition: server.c:39
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1026
#define WAIT_OBJECT_0
Definition: winbase.h:387
RPC_STATUS WINAPI RpcServerUseProtseqEpA(RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:910
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1116
int ret
#define ok(value,...)
Definition: atltest.h:57
RPC_STATUS WINAPI RpcMgmtWaitServerListen(void)
Definition: rpc_server.c:1539
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by START_TEST().

◆ run_tests()

static void run_tests ( void  )
static

Definition at line 1854 of file server.c.

1855 {
1856  basic_tests();
1857  union_tests();
1858  pointer_tests();
1859  array_tests();
1860  context_handle_test();
1862 }
static void union_tests(void)
Definition: server.c:1293
static void test_handle_return(void)
Definition: server.c:1843
static void array_tests(void)
Definition: server.c:1613
static void basic_tests(void)
Definition: server.c:1121
static void pointer_tests(void)
Definition: server.c:1472

Referenced by client().

◆ s_authinfo_test()

void __cdecl s_authinfo_test ( unsigned int  protseq,
int  secure 
)

Definition at line 1771 of file server.c.

1772 {
1773  RPC_BINDING_HANDLE binding;
1775  ULONG level, authnsvc;
1776  RPC_AUTHZ_HANDLE privs;
1777  unsigned char *principal;
1778 
1779  binding = I_RpcGetCurrentCallHandle();
1780  ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n");
1781 
1782  level = authnsvc = 0xdeadbeef;
1783  privs = (RPC_AUTHZ_HANDLE)0xdeadbeef;
1784  principal = (unsigned char *)0xdeadbeef;
1785 
1786  if (secure || protseq == RPC_PROTSEQ_LRPC)
1787  {
1788  status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL);
1790  {
1791  win_skip("RpcBindingInqAuthClientA not supported\n");
1792  return;
1793  }
1794  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1795  ok(privs != (RPC_AUTHZ_HANDLE)0xdeadbeef, "privs unchanged\n");
1796  ok(principal != (unsigned char *)0xdeadbeef, "principal unchanged\n");
1797  if (protseq != RPC_PROTSEQ_LRPC)
1798  {
1799  todo_wine
1800  ok(principal != NULL, "NULL principal\n");
1801  }
1802  if (protseq == RPC_PROTSEQ_LRPC && principal)
1803  {
1804  int len;
1805  char *spn;
1806 
1807  len = WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, NULL, 0, NULL, NULL);
1808  spn = HeapAlloc( GetProcessHeap(), 0, len );
1809  WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, spn, len, NULL, NULL);
1810 
1811  ok(!strcmp(domain_and_user, spn), "expected %s got %s\n", domain_and_user, spn);
1812  HeapFree( GetProcessHeap(), 0, spn );
1813  }
1814  ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "level unchanged\n");
1815  ok(authnsvc == RPC_C_AUTHN_WINNT, "authnsvc unchanged\n");
1816  RpcStringFreeA(&principal);
1817 
1818  status = RpcBindingInqAuthClientA(NULL, &privs, &principal, &level, &authnsvc, NULL);
1819  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1820  RpcStringFreeA(&principal);
1821 
1822  status = RpcBindingInqAuthClientExA(NULL, &privs, &principal, &level, &authnsvc, NULL, 0);
1823  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1824  RpcStringFreeA(&principal);
1825 
1827  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1828  status = RpcRevertToSelf();
1829  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1830 
1831  }
1832  else
1833  {
1834  status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL);
1835  ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %u\n", status);
1836  ok(privs == (RPC_AUTHZ_HANDLE)0xdeadbeef, "got %p\n", privs);
1837  ok(principal == (unsigned char *)0xdeadbeef, "got %s\n", principal);
1838  ok(level == 0xdeadbeef, "got %u\n", level);
1839  ok(authnsvc == 0xdeadbeef, "got %u\n", authnsvc);
1840  }
1841 }
GLint level
Definition: gl.h:1546
#define RPC_C_AUTHN_WINNT
Definition: rpcdce.h:158
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
void * RPC_AUTHZ_HANDLE
Definition: rpcdce.h:48
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc)
Definition: rpc_binding.c:1568
#define RPC_PROTSEQ_LRPC
Definition: rpcdce.h:127
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:158
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
static char * domain_and_user
Definition: server.c:56
#define RPC_S_CANNOT_SUPPORT
Definition: winerror.h:1072
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1459
#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY
Definition: rpcdce.h:151
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define todo_wine
Definition: test.h:163
GLenum GLsizei len
Definition: glext.h:6722
static int secure
Definition: server.c:138
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743
#define RPC_S_BINDING_HAS_NO_AUTH
Definition: winerror.h:1054
#define ok(value,...)
Definition: atltest.h:57
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1052
unsigned int ULONG
Definition: retypes.h:1
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static SERVICE_STATUS status
Definition: service.c:31
#define win_skip
Definition: test.h:150
#define HeapFree(x, y, z)
Definition: compat.h:402
#define RPC_S_OK
Definition: rpcnterr.h:22
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
Definition: rpc_binding.c:1592
Definition: ps.c:97

◆ s_check_null()

void __cdecl s_check_null ( int null)

Definition at line 710 of file server.c.

711 {
712  ok(!null, "RPC check_null\n");
713 }
#define ok(value,...)
Definition: atltest.h:57

◆ s_check_se2()

void __cdecl s_check_se2 ( se_t *  s)

Definition at line 620 of file server.c.

621 {
622  ok(s->f == E2, "check_se2\n");
623 }
GLdouble s
Definition: gl.h:2039
#define ok(value,...)
Definition: atltest.h:57

◆ s_context_handle_test()

void __cdecl s_context_handle_test ( void  )

Definition at line 852 of file server.c.

853 {
854  NDR_SCONTEXT h;
855  RPC_BINDING_HANDLE binding;
857  unsigned char buf[20];
858  static RPC_SERVER_INTERFACE server_if =
859  {
860  sizeof(RPC_SERVER_INTERFACE),
861  {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}},
862  {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
863  NULL,
864  0,
865  0,
866  0,
867  0,
868  0,
869  };
870 
871  binding = I_RpcGetCurrentCallHandle();
872  ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n");
873 
874  if (!pNDRSContextMarshall2 || !pNDRSContextUnmarshall2)
875  {
876  win_skip("NDRSContextMarshall2 or NDRSContextUnmarshall2 not exported from rpcrt4.dll\n");
877  return;
878  }
879 
880  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
881  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
882 
883  /* marshal a context handle with NULL userContext */
884  memset(buf, 0xcc, sizeof(buf));
885  pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0);
886  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
887  ok(UuidIsNil((UUID *)&buf[4], &status), "uuid should have been nil\n");
888 
889  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
890  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
891 
892  /* marshal a context handle with non-NULL userContext */
893  memset(buf, 0xcc, sizeof(buf));
894  h->userContext = (void *)0xdeadbeef;
895  pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0);
896  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
897  ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
898 
899  /* raises ERROR_INVALID_HANDLE exception on Vista upwards */
900  if (0)
901  {
902  h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
903  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
904  ok(h->userContext == (void *)0xdeadbeef, "userContext of interface didn't unmarshal properly: %p\n", h->userContext);
905 
906  /* marshal a context handle with an interface specified */
907  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0);
908  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
909 
910  memset(buf, 0xcc, sizeof(buf));
911  h->userContext = (void *)0xcafebabe;
912  pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0);
913  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
914  ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
915 
916  h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0);
917  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
918  ok(h->userContext == (void *)0xcafebabe, "userContext of interface didn't unmarshal properly: %p\n", h->userContext);
919  }
920 
921  /* test same interface data, but different pointer */
922  /* raises ERROR_INVALID_HANDLE exception */
923  if (0)
924  {
925  RPC_SERVER_INTERFACE server_if_clone = server_if;
926 
927  pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if_clone.InterfaceId, 0);
928  }
929 
930  /* test different interface data, but different pointer */
931  /* raises ERROR_INVALID_HANDLE exception */
932  if (0)
933  {
934  static RPC_SERVER_INTERFACE server_if2 =
935  {
936  sizeof(RPC_SERVER_INTERFACE),
937  {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}},
938  {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
939  NULL,
940  0,
941  0,
942  0,
943  0,
944  0,
945  };
946  pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0);
947 
948  pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if2.InterfaceId, 0);
949  }
950 
951  binding = NULL;
953 
954  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
955  ok(binding != NULL, "binding is NULL\n");
956 
957  if (status == RPC_S_OK && binding != NULL)
958  {
959  unsigned char* string_binding = NULL;
960  unsigned char* object_uuid = NULL;
961  unsigned char* protseq = NULL;
962  unsigned char* network_address = NULL;
963  unsigned char* endpoint = NULL;
964  unsigned char* network_options = NULL;
965 
966  status = RpcBindingToStringBindingA(binding, &string_binding);
967  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
968  ok(string_binding != NULL, "string_binding is NULL\n");
969 
970  status = RpcStringBindingParseA(string_binding, &object_uuid, &protseq, &network_address, &endpoint, &network_options);
971  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
972  ok(protseq != NULL && *protseq != '\0', "protseq is %s\n", protseq);
973  ok(network_address != NULL && *network_address != '\0', "network_address is %s\n", network_address);
974 
975  todo_wine
976  {
977  ok(object_uuid != NULL && *object_uuid == '\0', "object_uuid is %s\n", object_uuid);
978  ok(endpoint != NULL && *endpoint == '\0', "endpoint is %s\n", endpoint);
979  ok(network_options != NULL && *network_options == '\0', "network_options is %s\n", network_options);
980  }
981 
982  RpcStringFreeA(&string_binding);
983  RpcStringFreeA(&object_uuid);
984  RpcStringFreeA(&protseq);
985  RpcStringFreeA(&network_address);
987  RpcStringFreeA(&network_options);
988  RpcBindingFree(&binding);
989  }
990 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
RPC_STATUS WINAPI RpcStringBindingParseA(RPC_CSTR StringBinding, RPC_CSTR *ObjUuid, RPC_CSTR *Protseq, RPC_CSTR *NetworkAddr, RPC_CSTR *Endpoint, RPC_CSTR *Options)
Definition: rpc_binding.c:564
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:158
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:266
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingServerFromClient(RPC_BINDING_HANDLE ClientBinding, RPC_BINDING_HANDLE *ServerBinding)
Definition: rpc_binding.c:1642
RPC_STATUS WINAPI RpcBindingToStringBindingA(RPC_BINDING_HANDLE Binding, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:916
struct _RPC_SERVER_INTERFACE RPC_SERVER_INTERFACE
#define todo_wine
Definition: test.h:163
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743
Definition: nis.h:10
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
#define ok(value,...)
Definition: atltest.h:57
unsigned int ULONG
Definition: retypes.h:1
#define memset(x, y, z)
Definition: compat.h:39
static SERVICE_STATUS status
Definition: service.c:31
#define win_skip
Definition: test.h:150
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

◆ s_cstr_length()

int __cdecl s_cstr_length ( const char s,
int  n 
)

Definition at line 368 of file server.c.

369 {
370  int len = 0;
371  while (0 < n-- && *s++)
372  ++len;
373  return len;
374 }
GLdouble n
Definition: glext.h:7729
GLenum GLsizei len
Definition: glext.h:6722
GLdouble s
Definition: gl.h:2039

◆ s_dot_copy_vectors()

int __cdecl s_dot_copy_vectors ( vector_t  u,
vector_t  v 
)

Definition at line 587 of file server.c.

588 {
589  return u.x * v.x + u.y * v.y + u.z * v.z;
590 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
const GLdouble * v
Definition: gl.h:2040

◆ s_dot_pvectors()

int __cdecl s_dot_pvectors ( pvectors_t *  p)

Definition at line 414 of file server.c.

415 {
416  return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z;
417 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_dot_self()

int __cdecl s_dot_self ( vector_t v)

Definition at line 376 of file server.c.

377 {
378  return s_square(v->x) + s_square(v->y) + s_square(v->z);
379 }
int __cdecl s_square(int x)
Definition: server.c:303
const GLdouble * v
Definition: gl.h:2040

◆ s_dot_two_vectors()

int __cdecl s_dot_two_vectors ( vector_t  vs[2])

Definition at line 510 of file server.c.

511 {
512  return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z;
513 }
static vector_t * vs
Definition: server.c:127

◆ s_echo_ranged_int()

int __cdecl s_echo_ranged_int ( int  i,
int  j,
int  k 
)

Definition at line 837 of file server.c.

838 {
839  return min( 100, i + j + k );
840 }
static int j
Definition: server.c:132
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int int k
Definition: server.c:132
#define min(a, b)
Definition: monoChain.cc:55

◆ s_echo_ranged_int2()

int __cdecl s_echo_ranged_int2 ( int  i)

Definition at line 842 of file server.c.

843 {
844  return i;
845 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

◆ s_enum_ord()

int __cdecl s_enum_ord ( e_t  e)

Definition at line 638 of file server.c.

639 {
640  switch (e)
641  {
642  case E1: return 1;
643  case E2: return 2;
644  case E3: return 3;
645  case E4: return 4;
646  default:
647  return 0;
648  }
649 }
#define e
Definition: ke_i.h:82

◆ s_full_pointer_null_test()

void __cdecl s_full_pointer_null_test ( int a,
int b 
)

Definition at line 1028 of file server.c.

1029 {
1030  ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
1031  ok(b == NULL, "Expected b to be NULL instead of %p\n", b);
1032 }
smooth NULL
Definition: ftsmooth.c:416
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define ok(value,...)
Definition: atltest.h:57
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_full_pointer_test()

void __cdecl s_full_pointer_test ( int a,
int b 
)

Definition at line 1021 of file server.c.

1022 {
1023  ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
1024  ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a);
1025  ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b);
1026 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define ok(value,...)
Definition: atltest.h:57
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_get_a_bstr()

void __cdecl s_get_a_bstr ( bstr_t b)

Definition at line 763 of file server.c.

764 {
765  bstr_t bstr;
766  short str[] = {5, 'W', 'i', 'n', 'e', 0};
767  bstr = HeapAlloc(GetProcessHeap(), 0, sizeof(str));
768  memcpy(bstr, str, sizeof(str));
769  *b = bstr + 1;
770 }
Definition: oleaut.c:84
const WCHAR * str
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by pointer_tests().

◆ s_get_cpsc()

int __cdecl s_get_cpsc ( int  n,
cpsc_t *  cpsc 
)

Definition at line 550 of file server.c.

551 {
552  int i, ret;
553 
554  cpsc->a = 2 * n;
555  cpsc->b = 2;
556  cpsc->c = 1;
557  cpsc->ca = MIDL_user_allocate( cpsc->a * sizeof(int) );
558  for (i = ret = 0; i < cpsc->a; i++) cpsc->ca[i] = i;
559  for (i = ret = 0; i < cpsc->a; i++) ret += cpsc->ca[i];
560  return ret;
561 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int n
Definition: server.c:72
static cpsc_t * cpsc
Definition: server.c:95
#define for
Definition: utility.h:88
int ret
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_filename()

str_t __cdecl s_get_filename ( void  )

Definition at line 832 of file server.c.

833 {
834  return (char *)__FILE__;
835 }

◆ s_get_handle()

ctx_handle_t __cdecl s_get_handle ( void  )

Definition at line 1077 of file server.c.

1078 {
1079  return (ctx_handle_t)0xdeadbeef;
1080 }
static ctx_handle_t(__cdecl *get_handle)(void)

◆ s_get_handle_by_ptr()

void __cdecl s_get_handle_by_ptr ( ctx_handle_t r)

Definition at line 1082 of file server.c.

1083 {
1084  *r = (ctx_handle_t)0xdeadbeef;
1085 }
static ctx_handle_t(__cdecl *get_handle)(void)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

◆ s_get_name()

void __cdecl s_get_name ( name_t *  name)

Definition at line 772 of file server.c.

773 {
774  const char bossman[] = "Jeremy White";
775  memcpy(name->name, bossman, min(name->size, sizeof(bossman)));
776  /* ensure nul-termination */
777  if (name->size < sizeof(bossman))
778  name->name[name->size - 1] = 0;
779 }
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
Definition: name.c:38
WCHAR * name
Definition: name.c:42

◆ s_get_names()

void __cdecl s_get_names ( int n,
str_array_t *  names 
)

Definition at line 781 of file server.c.

782 {
783  str_array_t list;
784 
785  list = MIDL_user_allocate(2 * sizeof(list[0]));
786  list[0] = MIDL_user_allocate(6);
787  strcpy(list[0], "Hello");
788  list[1] = MIDL_user_allocate(7);
789  strcpy(list[1], "World!");
790 
791  *names = list;
792  *n = 2;
793 }
GLdouble n
Definition: glext.h:7729
GLuint GLuint * names
Definition: glext.h:11545
Definition: _list.h:228
#define list
Definition: rosglue.h:35
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_namesw()

void __cdecl s_get_namesw ( int n,
wstr_array_t *  names 
)

Definition at line 795 of file server.c.

796 {
797  wstr_array_t list;
798 
799  list = MIDL_user_allocate(2 * sizeof(list[0]));
800  list[0] = MIDL_user_allocate(sizeof(helloW));
801  lstrcpyW(list[0], helloW);
802  list[1] = MIDL_user_allocate(sizeof(worldW));
803  lstrcpyW(list[1], worldW);
804 
805  *names = list;
806  *n = 2;
807 }
static const WCHAR helloW[]
Definition: server.c:242
GLdouble n
Definition: glext.h:7729
GLuint GLuint * names
Definition: glext.h:11545
Definition: _list.h:228
static const WCHAR worldW[]
Definition: server.c:243
#define lstrcpyW
Definition: compat.h:414
#define list
Definition: rosglue.h:35
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_number_array()

void __cdecl s_get_number_array ( int  x[20],
int n 
)

Definition at line 515 of file server.c.

516 {
517  int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
518  memcpy(x, c, sizeof(c));
519  *n = ARRAY_SIZE(c);
520 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLubyte * c
Definition: glext.h:8905
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ARRAY_SIZE(a)
Definition: main.h:24

◆ s_get_numbers()

void __cdecl s_get_numbers ( int  length,
int  size,
pints_t  n[] 
)

Definition at line 992 of file server.c.

993 {
994  int i;
995  for (i = 0; i < length; i++)
996  {
997  n[i].pi = midl_user_allocate(sizeof(*n[i].pi));
998  *n[i].pi = i;
999  n[i].ppi = NULL;
1000  n[i].pppi = NULL;
1001  }
1002 }
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
static refpint_t pi[]
Definition: server.c:96
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
Definition: server.c:70

◆ s_get_numbers_struct()

void __cdecl s_get_numbers_struct ( numbers_struct_t **  ns)

Definition at line 1004 of file server.c.

1005 {
1006  int i;
1007  *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5]));
1008  if (!*ns) return;
1009  (*ns)->length = 5;
1010  (*ns)->size = 5;
1011  for (i = 0; i < (*ns)->length; i++)
1012  {
1013  (*ns)->numbers[i].pi = NULL;
1014  (*ns)->numbers[i].ppi = NULL;
1015  (*ns)->numbers[i].pppi = NULL;
1016  }
1017  (*ns)->numbers[0].pi = midl_user_allocate(sizeof(*(*ns)->numbers[i].pi));
1018  *(*ns)->numbers[0].pi = 5;
1019 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
Definition: server.c:70
Definition: mxnamespace.c:44
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ s_get_ranged_enum()

void __cdecl s_get_ranged_enum ( renum_t *  re)

Definition at line 847 of file server.c.

848 {
849  *re = RE3;
850 }

◆ s_get_s123()

s123_t* __cdecl s_get_s123 ( void  )

Definition at line 823 of file server.c.

824 {
825  s123_t *s = MIDL_user_allocate(sizeof *s);
826  s->f1 = 1;
827  s->f2 = 2;
828  s->f3 = 3;
829  return s;
830 }
GLdouble s
Definition: gl.h:2039
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_hash_bstr()

unsigned __cdecl s_hash_bstr ( bstr_t  b)

Definition at line 752 of file server.c.

753 {
754  short n = b[-1];
755  short *s = b;
756  unsigned hash = 0;
757  short i;
758  for (i = 0; i < n; ++i)
759  hash = 5 * hash + (unsigned) s[i];
760  return hash;
761 }
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int hash
Definition: main.c:58
static int n
Definition: server.c:72
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLdouble s
Definition: gl.h:2039
Definition: _hash_fun.h:40
static int int b
Definition: server.c:109

Referenced by pointer_tests().

◆ s_int_return()

int __cdecl s_int_return ( void  )

Definition at line 298 of file server.c.

299 {
300  return INT_CODE;
301 }
#define INT_CODE
Definition: server.c:41

◆ s_ip_test()

void __cdecl s_ip_test ( ipu_t *  a)

Definition at line 1058 of file server.c.

1059 {
1060  STATSTG st;
1061  HRESULT hr;
1062 
1063  hr = IStream_Stat(a->tagged_union.stream, &st, STATFLAG_NONAME);
1064  ok(hr == S_OK, "got %#x\n", hr);
1065 }
HRESULT hr
Definition: shlfolder.c:183
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_make_pyramid_doub_carr()

void __cdecl s_make_pyramid_doub_carr ( unsigned char  n,
doub_carr_t **  dc 
)

Definition at line 735 of file server.c.

736 {
737  doub_carr_t *t;
738  int i, j;
739  t = MIDL_user_allocate(FIELD_OFFSET(doub_carr_t, a[n]));
740  t->n = n;
741  for (i = 0; i < n; ++i)
742  {
743  int v = i + 1;
744  t->a[i] = MIDL_user_allocate(FIELD_OFFSET(doub_carr_1_t, a[v]));
745  t->a[i]->n = v;
746  for (j = 0; j < v; ++j)
747  t->a[i]->a[j] = j + 1;
748  }
749  *dc = t;
750 }
static int j
Definition: server.c:132
GLdouble n
Definition: glext.h:7729
GLdouble GLdouble t
Definition: gl.h:2047
static doub_carr_t ** dc
Definition: server.c:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int n
Definition: server.c:72
const GLdouble * v
Definition: gl.h:2040
static vector_t v
Definition: server.c:100
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_pints_sum()

int __cdecl s_pints_sum ( pints_t *  pints)

Definition at line 404 of file server.c.

405 {
406  return *pints->pi + **pints->ppi + ***pints->pppi;
407 }

◆ s_ptypes_sum()

double __cdecl s_ptypes_sum ( ptypes_t *  pt)

Definition at line 409 of file server.c.

410 {
411  return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd;
412 }
#define pt(x, y)
Definition: drawing.c:79

◆ s_square()

int __cdecl s_square ( int  x)

Definition at line 303 of file server.c.

304 {
305  return x * x;
306 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Referenced by s_dot_self(), s_square_out(), and s_square_ref().

◆ s_square_encu()

double __cdecl s_square_encu ( encu_t *  eu)

Definition at line 598 of file server.c.

599 {
600  switch (eu->t)
601  {
602  case ENCU_I: return eu->tagged_union.i * eu->tagged_union.i;
603  case ENCU_F: return eu->tagged_union.f * eu->tagged_union.f;
604  default:
605  return 0.0;
606  }
607 }
#define ENCU_F
#define ENCU_I
static unencu_t * eu
Definition: server.c:102

◆ s_square_encue()

double __cdecl s_square_encue ( encue_t *  eue)

Definition at line 651 of file server.c.

652 {
653  switch (eue->t)
654  {
655  case E1: return eue->tagged_union.i1 * eue->tagged_union.i1;
656  case E2: return eue->tagged_union.f2 * eue->tagged_union.f2;
657  default:
658  return 0.0;
659  }
660 }

◆ s_square_half()

double __cdecl s_square_half ( double  x,
double y 
)

Definition at line 381 of file server.c.

382 {
383  *y = x / 2.0;
384  return x * x;
385 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_half_float()

float __cdecl s_square_half_float ( float  x,
float y 
)

Definition at line 387 of file server.c.

388 {
389  *y = x / 2.0f;
390  return x * x;
391 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_half_long()

LONG __cdecl s_square_half_long ( LONG  x,
LONG y 
)

Definition at line 393 of file server.c.

394 {
395  *y = x / 2;
396  return x * x;
397 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_out()

void __cdecl s_square_out ( int  x,
int y 
)

Definition at line 348 of file server.c.

349 {
350  *y = s_square(x);
351 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_square(int x)
Definition: server.c:303
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_puint()

int __cdecl s_square_puint ( puint_t  p)

Definition at line 563 of file server.c.

564 {
565  int n = atoi(p);
566  return n * n;
567 }
GLdouble n
Definition: glext.h:7729
static int n
Definition: server.c:72
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_square_ref()

void __cdecl s_square_ref ( int x)

Definition at line 353 of file server.c.

354 {
355  *x = s_square(*x);
356 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_square(int x)
Definition: server.c:303

◆ s_square_sun()

double __cdecl s_square_sun ( sun_t *  su)

Definition at line 424 of file server.c.

425 {
426  switch (su->s)
427  {
428  case SUN_I: return su->u.i * su->u.i;
429  case SUN_F1:
430  case SUN_F2: return su->u.f * su->u.f;
431  case SUN_PI: return (*su->u.pi) * (*su->u.pi);
432  default:
433  return 0.0;
434  }
435 }
#define SUN_PI
#define SUN_F2
#define SUN_I
#define SUN_F1

◆ s_square_test_us()

int __cdecl s_square_test_us ( test_us_t *  tus)

Definition at line 592 of file server.c.

593 {
594  int n = atoi(tus->us.x);
595  return n * n;
596 }
GLdouble n
Definition: glext.h:7729
static int n
Definition: server.c:72
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)

◆ s_square_unencu()

double __cdecl s_square_unencu ( int  t,
unencu_t *  eu 
)

Definition at line 609 of file server.c.

610 {
611  switch (t)
612  {
613  case ENCU_I: return eu->i * eu->i;
614  case ENCU_F: return eu->f * eu->f;
615  default:
616  return 0.0;
617  }
618 }
#define ENCU_F
GLdouble GLdouble t
Definition: gl.h:2047
#define ENCU_I
static unencu_t * eu
Definition: server.c:102

◆ s_stop()

void __cdecl s_stop ( void  )

Definition at line 1034 of file server.c.

1035 {
1036  if (!stop_wait_event)
1037  {
1038  ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n");
1039  ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n");
1040  }
1041  ok(SetEvent(stop_event), "SetEvent\n");
1042  if (stop_wait_event)
1043  {
1044  DWORD ret;
1046  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
1047  }
1048 }
RPC_STATUS WINAPI RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1596
static HANDLE stop_event
Definition: server.c:46
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
Definition: rpc_server.c:1202
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static HANDLE stop_wait_event
Definition: server.c:46
smooth NULL
Definition: ftsmooth.c:416
#define WAIT_OBJECT_0
Definition: winbase.h:387
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define ok(value,...)
Definition: atltest.h:57
#define RPC_S_OK
Definition: rpcnterr.h:22

◆ s_stop_autolisten()

void __cdecl s_stop_autolisten ( void  )

Definition at line 1050 of file server.c.

1051 {
1054 todo_wine
1055  ok(status == RPC_S_UNKNOWN_MGR_TYPE, "got %u\n", status);
1056 }
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
Definition: rpc_server.c:1202
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
#define RPC_S_UNKNOWN_MGR_TYPE
Definition: winerror.h:1027
#define todo_wine
Definition: test.h:163
#define ok(value,...)
Definition: atltest.h:57
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ s_str_length()

int __cdecl s_str_length ( const char s)

Definition at line 358 of file server.c.

359 {
360  return strlen(s);
361 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039

◆ s_str_struct_len()

int __cdecl s_str_struct_len ( str_struct_t *  s)

Definition at line 715 of file server.c.

716 {
717  return lstrlenA(s->s);
718 }
GLdouble s
Definition: gl.h:2039
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145

◆ s_str_t_length()

int __cdecl s_str_t_length ( str_t  s)

Definition at line 363 of file server.c.

364 {
365  return strlen(s);
366 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039

◆ s_sum()

int __cdecl s_sum ( int  x,
int  y 
)

Definition at line 308 of file server.c.

309 {
310  return x + y;
311 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_aligns()

double __cdecl s_sum_aligns ( aligns_t *  a)

Definition at line 681 of file server.c.

682 {
683  return a->c + a->i + a->s + a->d;
684 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_array_ptr()

int __cdecl s_sum_array_ptr ( int(*)  a[2])

Definition at line 1072 of file server.c.

1073 {
1074  return (*a)[0] + (*a)[1];
1075 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_bogus()

int __cdecl s_sum_bogus ( bogus_t *  b)

Definition at line 705 of file server.c.

706 {
707  return *b->h.p1 + *b->p2 + *b->p3 + b->c;
708 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204

◆ s_sum_char()

signed char __cdecl s_sum_char ( signed char  x,
signed char  y 
)

Definition at line 313 of file server.c.

314 {
315  return x + y;
316 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_char_hyper()

int __cdecl s_sum_char_hyper ( signed char  x,
hyper  y 
)

Definition at line 343 of file server.c.

344 {
345  return x + y;
346 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_complex_array()

int __cdecl s_sum_complex_array ( int  n,
refpint_t  pi[] 
)

Definition at line 502 of file server.c.

503 {
504  int total = 0;
505  for (; n > 0; n--)
506  total += *pi[n - 1];
507  return total;
508 }
GLdouble n
Definition: glext.h:7729
static refpint_t pi[]
Definition: server.c:96

◆ s_sum_conf_array()

int __cdecl s_sum_conf_array ( int  x[],
int  n 
)

Definition at line 457 of file server.c.

458 {
459  int *p = x, *end = p + n;
460  int sum = 0;
461 
462  while (p < end)
463  sum += *p++;
464 
465  return sum;
466 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int n
Definition: server.c:72
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by s_sum_cs(), s_sum_pcarr2(), s_sum_unique_conf_array(), s_sum_unique_conf_ptr(), and s_sum_var_array().

◆ s_sum_conf_ptr_by_conf_ptr()

int __cdecl s_sum_conf_ptr_by_conf_ptr ( int  n1,
int n2_then_x1,
int x2 
)

Definition at line 468 of file server.c.

469 {
470  int i;
471  int sum = 0;
472  if(n1 == 0)
473  return 0;
474 
475  for(i = 1; i < n1; ++i)
476  sum += n2_then_x1[i];
477 
478  for(i = 0; i < *n2_then_x1; ++i)
479  sum += x2[i];
480 
481  return sum;
482 }
static int * n2_then_x1
Definition: server.c:86
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
int n1
Definition: dwarfget.c:148
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706

◆ s_sum_cps()

int __cdecl s_sum_cps ( cps_t *  cps)

Definition at line 527 of file server.c.

528 {
529  int sum = 0;
530  int i;
531 
532  for (i = 0; i < *cps->pn; ++i)
533  sum += cps->ca1[i];
534 
535  for (i = 0; i < 2 * cps->n; ++i)
536  sum += cps->ca2[i];
537 
538  return sum;
539 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
#define for
Definition: utility.h:88

◆ s_sum_cpsc()

int __cdecl s_sum_cpsc ( cpsc_t *  cpsc)

Definition at line 541 of file server.c.

542 {
543  int sum = 0;
544  int i;
545  for (i = 0; i < (cpsc->c ? cpsc->a : cpsc->b); ++i)
546  sum += cpsc->ca[i];
547  return sum;
548 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static cpsc_t * cpsc
Definition: server.c:95

◆ s_sum_cpuints()

int __cdecl s_sum_cpuints ( cpuints_t *  p)

Definition at line 578 of file server.c.

579 {
580  int sum = 0;
581  int i;
582  for (i = 0; i < p->n; ++i)
583  sum += atoi(p->ps[i]);
584  return sum;
585 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_sum_cs()

int __cdecl s_sum_cs ( cs_t *  cs)

Definition at line 522 of file server.c.

523 {
524  return s_sum_conf_array(cs->ca, cs->n);
525 }
uint32_t cs
Definition: isohybrid.c:75
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:457

◆ s_sum_doub_carr()

int __cdecl s_sum_doub_carr ( doub_carr_t *  dc)

Definition at line 725 of file server.c.

726 {
727  int i, j;
728  int sum = 0;
729  for (i = 0; i < dc->n; ++i)
730  for (j = 0; j < dc->a[i]->n; ++j)
731  sum += dc->a[i]->a[j];
732  return sum;
733 }
static int j
Definition: server.c:132
static doub_carr_t ** dc
Definition: server.c:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35

◆ s_sum_double_int()

int __cdecl s_sum_double_int ( int  x,
double  y 
)

Definition at line 328 of file server.c.

329 {
330  return x + y;
331 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_fixed_array()

int __cdecl s_sum_fixed_array ( int  a[5])

Definition at line 399 of file server.c.

400 {
401  return a[0] + a[1] + a[2] + a[3] + a[4];
402 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_fixed_int_3d()

int __cdecl s_sum_fixed_int_3d ( int  m[2][3][4])

Definition at line 444 of file server.c.

445 {
446  int i, j, k;
447  int sum = 0;
448 
449  for (i = 0; i < 2; ++i)
450  for (j = 0; j < 3; ++j)
451  for (k = 0; k < 4; ++k)
452  sum += m[i][j][k];
453 
454  return sum;
455 }
static int j
Definition: server.c:132
const GLfloat * m
Definition: glext.h:10848
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int int k
Definition: server.c:132

◆ s_sum_float()

int __cdecl s_sum_float ( float  x,
float  y 
)

Definition at line 323 of file server.c.

324 {
325  return x + y;
326 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_hyper()

hyper __cdecl s_sum_hyper ( hyper  x,
hyper  y 
)

Definition at line 333 of file server.c.

334 {
335  return x + y;
336 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_hyper_int()

int __cdecl s_sum_hyper_int ( hyper  x,
hyper  y 
)

Definition at line 338 of file server.c.

339 {
340  return x + y;
341 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_L1_norms()

int __cdecl s_sum_L1_norms ( int  n,
vector_t vs 
)

Definition at line 814 of file server.c.

815 {
816  int i;
817  int sum = 0;
818  for (i = 0; i < n; ++i)
819  sum += abs(vs[i].x) + abs(vs[i].y) + abs(vs[i].z);
820  return sum;
821 }
#define abs(i)
Definition: fconv.c:206
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLdouble GLdouble z
Definition: glext.h:5874
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int n
Definition: server.c:72
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static vector_t * vs
Definition: server.c:127

◆ s_sum_padded()

int __cdecl s_sum_padded ( padded_t *  p)

Definition at line 686 of file server.c.

687 {
688  return p->i + p->c;
689 }
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by s_sum_padded2(), and s_sum_padded_conf().

◆ s_sum_padded2()

int __cdecl s_sum_padded2 ( padded_t  ps[2])

Definition at line 691 of file server.c.

692 {
693  return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]);
694 }
int __cdecl s_sum_padded(padded_t *p)
Definition: server.c:686

◆ s_sum_padded_conf()

int __cdecl s_sum_padded_conf ( padded_t *  ps,
int  n 
)

Definition at line 696 of file server.c.

697 {
698  int sum = 0;
699  int i;
700  for (i = 0; i < n; ++i)
701  sum += s_sum_padded(&ps[i]);
702  return sum;
703 }
int __cdecl s_sum_padded(padded_t *p)
Definition: server.c:686
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int n
Definition: server.c:72

◆ s_sum_parr()

int __cdecl s_sum_parr ( int a[3])

Definition at line 625 of file server.c.

626 {
627  return s_sum_pcarr(a, 3);
628 }
int __cdecl s_sum_pcarr(int *a[], int n)
Definition: server.c:630
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_pcarr()

int __cdecl s_sum_pcarr ( int a[],
int  n 
)

Definition at line 630 of file server.c.

631 {
632  int i, s = 0;
633  for (i = 0; i < n; ++i)
634  s += *a[i];
635  return s;
636 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int n
Definition: server.c:72
GLdouble s
Definition: gl.h:2039
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Referenced by s_sum_parr().

◆ s_sum_pcarr2()

int __cdecl s_sum_pcarr2 ( int  n,
int **  pa 
)

Definition at line 809 of file server.c.

810 {
811  return s_sum_conf_array(*pa, n);
812 }
GLdouble n
Definition: glext.h:7729
static int ** pa
Definition: server.c:126
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:457

◆ s_sum_ptr_array()

int __cdecl s_sum_ptr_array ( int a[2])

Definition at line 1067 of file server.c.

1068 {
1069  return *a[0] + *a[1];
1070 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_puints()

int __cdecl s_sum_puints ( puints_t *  p)

Definition at line 569 of file server.c.

570 {
571  int sum = 0;
572  int i;
573  for (i = 0; i < p->n; ++i)
574  sum += atoi(p->ps[i]);
575  return sum;
576 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_sum_short()

short __cdecl s_sum_short ( short  x,
short  y 
)

Definition at line 318 of file server.c.

319 {
320  return x + y;
321 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static int y
Definition: server.c:60

◆ s_sum_sp()

int __cdecl s_sum_sp ( sp_t *  sp)

Definition at line 419 of file server.c.

420 {
421  return sp->x + sp->s->x;
422 }
static const WCHAR sp[]
Definition: suminfo.c:288

◆ s_sum_toplev_conf_2n()

int __cdecl s_sum_toplev_conf_2n ( int x,
int  n 
)

Definition at line 662 of file server.c.

663 {
664  int sum = 0;
665  int i;
666  for (i = 0; i < 2 * n; ++i)
667  sum += x[i];
668  return sum;
669 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int n
Definition: server.c:72

◆ s_sum_toplev_conf_cond()

int __cdecl s_sum_toplev_conf_cond ( int x,
int  a,
int  b,
int  c 
)

Definition at line 671 of file server.c.

672 {
673  int sum = 0;
674  int n = c ? a : b;
675  int i;
676  for (i = 0; i < n; ++i)
677  sum += x[i];
678  return sum;
679 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
static int n
Definition: server.c:72
const GLubyte * c
Definition: glext.h:8905
static int a
Definition: server.c:109
static int int b
Definition: server.c:109

◆ s_sum_unique_conf_array()

int __cdecl s_sum_unique_conf_array ( int  x[],
int  n 
)

Definition at line 484 of file server.c.

485 {
486  return s_sum_conf_array(x, n);
487 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:457

◆ s_sum_unique_conf_ptr()

int __cdecl s_sum_unique_conf_ptr ( int x,
int  n 
)

Definition at line 489 of file server.c.

490 {
491  return x ? s_sum_conf_array(x, n) : 0;
492 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:457

◆ s_sum_var_array()

int __cdecl s_sum_var_array ( int  x[20],
int  n 
)

Definition at line 494 of file server.c.

495 {
496  ok(0 <= n, "RPC sum_var_array\n");
497  ok(n <= 20, "RPC sum_var_array\n");
498 
499  return