Changeset 6603 for pymolproxy/trunk
- Timestamp:
- Nov 10, 2016, 7:16:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pymolproxy/trunk/pymolproxy.c
r6602 r6603 200 200 int rockOffset; 201 201 int cacheId; 202 int error;203 202 int status; 204 203 int width, height; /* Size of viewport. */ … … 299 298 size_t length; 300 299 301 if (proxyPtr->error) {302 return TCL_ERROR;303 }304 305 300 va_start(ap, format); 306 result = vsnprintf(buffer, BUFSIZ -1, format, ap);301 result = vsnprintf(buffer, BUFSIZ, format, ap); 307 302 va_end(ap); 303 if (result >= BUFSIZ) { 304 ERROR("Buffer too small for command (len=%d)", result); 305 proxyPtr->status = TCL_ERROR; 306 return proxyPtr->status; 307 } 308 308 309 309 #ifdef EXEC_DEBUG 310 DEBUG("to-pymol>(%s) code=%d", buffer, result);310 DEBUG("to-pymol>(%s) len=%d", buffer, result); 311 311 #endif 312 312 if (recording) { … … 320 320 ERROR("short write to pymol (wrote=%d, should have been %d): %s", 321 321 numWritten, length, strerror(errno)); 322 }323 proxyPtr->status = result;324 return 322 proxyPtr->status = TCL_ERROR; 323 } 324 return proxyPtr->status; 325 325 } 326 326 … … 552 552 clear_error(PymolProxy *proxyPtr) 553 553 { 554 proxyPtr->error = 0;555 554 proxyPtr->status = TCL_OK; 556 555 } … … 2156 2155 close(f); 2157 2156 } 2158 INFO(" attempting to start\"%s\"", argv[0]);2157 INFO("Executing \"%s\"", argv[0]); 2159 2158 execvp(argv[0], argv); 2160 2159 ERROR("can't exec `%s': %s", argv[0], strerror(errno));
Note: See TracChangeset
for help on using the changeset viewer.