(entryPtr, value)
| 1186 | * Side effects: |
| 1187 | * The string displayed in the entry will change. Any selection |
| 1188 | * in the entry is lost and the insertion point gets set to the |
| 1189 | * end of the entry. Note: this procedure does *not* update the |
| 1190 | * entry's associated variable, since that could result in an |
| 1191 | * infinite loop. |
| 1192 | * |
| 1193 | *---------------------------------------------------------------------- |
| 1194 | */ |
| 1195 | |
| 1196 | static void |
| 1197 | EntrySetValue(entryPtr, value) |
| 1198 | register Entry *entryPtr; /* Entry whose value is to be |
| 1199 | * changed. */ |
| 1200 | char *value; /* New text to display in entry. */ |
| 1201 | { |
| 1202 | ckfree(entryPtr->string); |
| 1203 | entryPtr->numChars = strlen(value); |
| 1204 | entryPtr->string = (char *) ckalloc((unsigned) (entryPtr->numChars + 1)); |
| 1205 | strcpy(entryPtr->string, value); |
| 1206 | entryPtr->selectFirst = entryPtr->selectLast = -1; |
| 1207 | entryPtr->leftIndex = 0; |
no test coverage detected