Changeset 6602 for pymolproxy/trunk
- Timestamp:
- Nov 10, 2016, 6:05:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pymolproxy/trunk/pymolproxy.c
r6601 r6602 273 273 274 274 if (debug) { 275 DEBUG("%s \n", message);275 DEBUG("%s", message); 276 276 } else { 277 277 syslog(priority, message, length); … … 1857 1857 if (result != TCL_OK) { 1858 1858 #if EXEC_DEBUG 1859 DEBUG("result was %s \n", Tcl_GetString(Tcl_GetObjResult(interp)));1859 DEBUG("result was %s", Tcl_GetString(Tcl_GetObjResult(interp))); 1860 1860 #endif 1861 1861 } … … 2105 2105 2106 2106 #if DEBUG 2107 DEBUG("Entering InitProxy \n");2107 DEBUG("Entering InitProxy"); 2108 2108 #endif 2109 2109 /* Create two pipes for communication with the external application. One … … 2122 2122 child = fork(); 2123 2123 if (child < 0) { 2124 ERROR("can't fork process: %s \n", strerror(errno));2124 ERROR("can't fork process: %s", strerror(errno)); 2125 2125 return -3; 2126 2126 } … … 2167 2167 2168 2168 #if DEBUG 2169 DEBUG("Started %s DISPLAY=%s \n", argv[0], getenv("DISPLAY"));2169 DEBUG("Started %s DISPLAY=%s", argv[0], getenv("DISPLAY")); 2170 2170 #endif 2171 2171 /* close opposite end of pipe, these now belong to the child process */ … … 2194 2194 for (cp = cmdProcs; cp->name != NULL; cp++) { 2195 2195 #if DEBUG 2196 DEBUG("Adding command %s \n", cp->name);2196 DEBUG("Adding command %s", cp->name); 2197 2197 #endif 2198 2198 Tcl_CreateCommand(interp, cp->name, cp->proc, p, NULL); … … 2287 2287 status = GetLine(&p->client, &numBytes, &line); 2288 2288 if (status != BUFFER_OK) { 2289 ERROR("can't read client stdout (numBytes=%d): %s \n", numBytes,2289 ERROR("can't read client stdout (numBytes=%d): %s", numBytes, 2290 2290 strerror(errno)); 2291 2291 goto done; … … 2371 2371 } 2372 2372 #if WRITE_DEBUG 2373 DEBUG("Writer: line found is %s\n", line);2373 DEBUG("Writer: line found is \"%.*s\"", (int)len, line); 2374 2374 #endif 2375 2375 if (strncmp(line, "image follows: ", 15) != 0) { … … 2378 2378 if (sscanf(line, "image follows: %d %s %d %d\n", &numBytes, cacheId, 2379 2379 &frameNum, &rockOffset) != 4) { 2380 ERROR("can't get # bytes from \"% s\"", line);2380 ERROR("can't get # bytes from \"%.*s\"", (int)len, line); 2381 2381 DEBUG("Leaving Writer thread"); 2382 2382 return NULL; 2383 2383 } 2384 2384 #if WRITE_DEBUG 2385 DEBUG("found image line \"%.*s\"", numBytes, line);2385 DEBUG("found image line (%d bytes)", numBytes); 2386 2386 #endif 2387 2387 sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId, … … 2389 2389 hdrLength = strlen(header); 2390 2390 #if WRITE_DEBUG 2391 DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d \n", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength);2391 DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength); 2392 2392 #endif 2393 2393 imgPtr = NewImage(&list, numBytes + hdrLength); … … 2445 2445 ERROR("Short write on version string", strerror(errno)); 2446 2446 } 2447 INFO("Starting pymolproxy (threaded version)");2447 DEBUG("Starting pymolproxy"); 2448 2448 2449 2449 InitProxy(&proxy, argv + 1);
Note: See TracChangeset
for help on using the changeset viewer.