| 231 | |
| 232 | |
| 233 | int name_length(const TEXT* const name) |
| 234 | { |
| 235 | /************************************** |
| 236 | * |
| 237 | * n a m e _ l e n g t h |
| 238 | * |
| 239 | ************************************** |
| 240 | * |
| 241 | * Functional description |
| 242 | * Compute effective length of system relation name and others. |
| 243 | * SQL delimited identifier may contain blanks. Trailing blanks are ignored. |
| 244 | * Assumes input is null terminated. |
| 245 | * |
| 246 | **************************************/ |
| 247 | const TEXT* q = name - 1; |
| 248 | for (const TEXT* p = name; *p; p++) |
| 249 | { |
| 250 | if (*p != ' ') { |
| 251 | q = p; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | return (q + 1) - name; |
| 256 | } |
| 257 | |
| 258 | |
| 259 | // ********************************* |