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

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

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

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

32
33/***************************************************************************
34* Module form_request_name *
35* Routines to handle external names of menu requests *
36***************************************************************************/
37
38#include "form.priv.h"
39
40MODULE_ID("$Id: frm_req_name.c,v 1.15 2005/04/16 16:59:27 tom Exp $")
40MODULE_ID("$Id: frm_req_name.c,v 1.16 2008/07/05 23:22:08 tom Exp $")
41
42static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
43{
44 "NEXT_PAGE",
45 "PREV_PAGE",
46 "FIRST_PAGE",
47 "LAST_PAGE",
48

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

149
150 T((T_CALLED("form_request_by_name(%s)"), _nc_visbuf(str)));
151
152 if (str)
153 {
154 strncpy(buf, str, sizeof(buf));
155 while ((i < sizeof(buf)) && (buf[i] != '\0'))
156 {
41
42static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
43{
44 "NEXT_PAGE",
45 "PREV_PAGE",
46 "FIRST_PAGE",
47 "LAST_PAGE",
48

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

149
150 T((T_CALLED("form_request_by_name(%s)"), _nc_visbuf(str)));
151
152 if (str)
153 {
154 strncpy(buf, str, sizeof(buf));
155 while ((i < sizeof(buf)) && (buf[i] != '\0'))
156 {
157 buf[i] = toupper(buf[i]);
157 buf[i] = toupper(UChar(buf[i]));
158 i++;
159 }
160
161 for (i = 0; i < A_SIZE; i++)
162 {
163 if (strncmp(request_names[i], buf, sizeof(buf)) == 0)
164 returnCode(MIN_FORM_COMMAND + (int) i);
165 }
166 }
167 RETURN(E_NO_MATCH);
168}
169
170/* frm_req_name.c ends here */
158 i++;
159 }
160
161 for (i = 0; i < A_SIZE; i++)
162 {
163 if (strncmp(request_names[i], buf, sizeof(buf)) == 0)
164 returnCode(MIN_FORM_COMMAND + (int) i);
165 }
166 }
167 RETURN(E_NO_MATCH);
168}
169
170/* frm_req_name.c ends here */