Subversion Repositories filter_foundry

Rev

Rev 376 | Rev 392 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 376 Rev 381
Line 140... Line 140...
140
                        GetDlgItemText(dp, FIRSTMAPNAMEITEM + i, s, MAXFIELD); myc2pstrcpy(gdata->parm.map[i], s);
140
                        GetDlgItemText(dp, FIRSTMAPNAMEITEM + i, s, MAXFIELD); myc2pstrcpy(gdata->parm.map[i], s);
141
                }
141
                }
142
                // Expressions
142
                // Expressions
143
                for (i = 0; i < 4; ++i) {
143
                for (i = 0; i < 4; ++i) {
144
                        if (!expr[i]) {
144
                        if (!expr[i]) {
145
                                simplealert("Bug! see builddlgitem");
145
                                simplealert(_strdup("Bug! see builddlgitem"));
146
                                return true; // keep going. Let the user try again
146
                                return true; // keep going. Let the user try again
147
                        }
147
                        }
148
                        if (strlen(expr[i]) >= sizeof(gdata->parm.formula[i])) {
148
                        if (strlen(expr[i]) >= sizeof(gdata->parm.formula[i])) {
149
                                if (i == 0) {
149
                                if (i == 0) {
150
                                        simplealert("Attention! The formula for channel R was too long (longer than 1023 characters) and was truncated.");
150
                                        simplealert(_strdup("Attention!The formula for channel R was too long(longer than 1023 characters) and was truncated."));
151
                                }
151
                                }
152
                                else if (i == 1) {
152
                                else if (i == 1) {
153
                                        simplealert("Attention! The formula for channel G was too long (longer than 1023 characters) and was truncated.");
153
                                        simplealert(_strdup("Attention! The formula for channel G was too long (longer than 1023 characters) and was truncated."));
154
                                }
154
                                }
155
                                else if (i == 2) {
155
                                else if (i == 2) {
156
                                        simplealert("Attention! The formula for channel B was too long (longer than 1023 characters) and was truncated.");
156
                                        simplealert(_strdup("Attention! The formula for channel B was too long (longer than 1023 characters) and was truncated."));
157
                                }
157
                                }
158
                                else if (i == 3) {
158
                                else if (i == 3) {
159
                                        simplealert("Attention! The formula for channel A was too long (longer than 1023 characters) and was truncated.");
159
                                        simplealert(_strdup("Attention! The formula for channel A was too long (longer than 1023 characters) and was truncated."));
160
                                }
160
                                }
161
                                expr[i][sizeof(gdata->parm.formula[i]) - 1] = '\0';
161
                                expr[i][sizeof(gdata->parm.formula[i]) - 1] = '\0';
162
                        }
162
                        }
163
                        strcpy((char*)gdata->parm.formula[i], expr[i]); // Attention! This is not a Pascal string!
163
                        strcpy((char*)gdata->parm.formula[i], expr[i]); // Attention! This is not a Pascal string!
164
                }
164
                }
Line 188... Line 188...
188
                }
188
                }
189
                else {
189
                else {
190
                        return true; // keep going. Let the user correct their input
190
                        return true; // keep going. Let the user correct their input
191
                }
191
                }
192
 
192
 
193
                /* ... falls through ... */
193
                return false; // end dialog
194
#ifdef MAC_ENV
194
#ifdef MAC_ENV
195
        case cancel:
195
        case cancel:
196
#else
196
#else
197
        case IDCANCEL:
197
        case IDCANCEL:
198
#endif
198
#endif