Changeset 5852 for trunk/Ohana/src/kapa/event/SetSection.c
- Timestamp:
- Dec 27, 2005, 3:23:01 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/kapa/event/SetSection.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa/event/SetSection.c
r4769 r5852 1 1 # include "Ximage.h" 2 # define SCAN \3 status = read (sock, buffer, 16); \4 buffer[16] = 0; \5 sscanf (buffer, "%*s %d", &Nbytes); \6 status = read (sock, buffer, Nbytes); \7 buffer[status] = 0;8 2 9 3 int SetSection (int SwitchSection) { 10 4 11 int i, status, Nbytes,NewSection, ThisSection, MoveSection;12 char buffer[128],name[128];5 int i, NewSection, ThisSection, MoveSection; 6 char name[128]; 13 7 double x, y, dx, dy; 14 8 15 SCAN;16 17 9 if (SwitchSection) { 18 sscanf (buffer, "%s", name);10 KiiScanMessage (sock, "%s", name); 19 11 } else { 20 sscanf (buffer, "%s %lf %lf %lf %lf", 21 name, &x, &y, &dx, &dy); 12 KiiScanMessage (sock, "%s %lf %lf %lf %lf", name, &x, &y, &dx, &dy); 22 13 } 23 14 … … 92 83 int ListSection () { 93 84 94 int i, status, Nbytes,ThisSection;95 char buffer[128],name[128];85 int i, ThisSection; 86 char name[128]; 96 87 97 SCAN; 98 99 sscanf (buffer, "%s", name); 88 KiiScanMessage (sock, "%s", name); 100 89 101 90 if (!strcmp (name, "*")) {
Note:
See TracChangeset
for help on using the changeset viewer.
