From - Tue May 28 15:57:18 2002 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: X-Sieve: cmu-sieve 2.0 Received: from nist.gov (verde.ncsl.nist.gov [129.6.84.15]) by email.nist.gov (8.12.2/8.12.2) with ESMTP id g2TIpYCk001733 for ; Fri, 29 Mar 2002 13:51:34 -0500 (EST) Sender: cugini Message-ID: <3CA4B7B6.821B99C3@nist.gov> Date: Fri, 29 Mar 2002 13:51:34 -0500 From: John Cugini Organization: NIST X-Mailer: Mozilla 4.79C-SGI [en] (X11; I; IRIX 6.5 IP22) X-Accept-Language: en MIME-Version: 1.0 To: Joe Konczal Subject: changes for visvip Content-Type: multipart/mixed; boundary="------------288FE43A3E60F543189BF4B8" Content-Length: 32058 Status: RO X-Status: X-Keywords: X-UID: 6283 This is a multi-part message in MIME format. --------------288FE43A3E60F543189BF4B8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit -- John Cugini / CUZ@NIST.GOV --------------288FE43A3E60F543189BF4B8 Content-Type: text/plain; charset=us-ascii; name="ctl.dif" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ctl.dif" Joe - here is the diff for VisVIP's ctl.tk - the new/correct version is the first part, the old/wrong version (currently on the Web Metrics site) is 2nd ... I've added a little commentary to explain the purpose of each change. Broadly, the *.up files are in a directory structure like this: sessions/ john-session/ john.ulog task-1.up task-2.up jane-session/ jane.ulog task-xxx.up task-yyy.up and the new code thinks on terms of which session(s) and which task(s) are to be displayed. Complete new versions are in: /home/cugini/html/webmet/VisVIP/ *** ../html/webmet/VisVIP/ctl.tk Fri Mar 29 10:46:19 2002 --- vv-from-webmet/ctl.tk Mon Jan 7 15:28:24 2002 *************** Inserted. A new procedure here that sets the state of a path: to display or not. *** 103,116 **** ### --------------------------------------------------------------- ### - proc toggle_path {state upname} { - if [regexp {^([^/]+)/([^/]+)$} $upname upall sess task ] { - send_file_to_ogl "N$sess" - send_file_to_ogl "$state$task" - } else { - puts "Toggle_path cannot parse $upname" - } - } - - ### --------------------------------------------------------------- ### proc set_next_user {} { global surfer_list chk_surf --- 103,106 ---- *************** Applied. tidy up - use toggle_path to erase *** 122,126 **** if {$chk_surf($surfname) == "S"} { set lastpos $curpos ! toggle_path "E" $surfname } set chk_surf($surfname) "E" --- 112,116 ---- if {$chk_surf($surfname) == "S"} { set lastpos $curpos ! send_file_to_ogl [format "E%s" $surfname] } set chk_surf($surfname) "E" *************** Applied. tidy up *** 138,142 **** if {$lastpos == $curpos} { set chk_surf($surfname) "S" ! toggle_path "S" $surfname break } --- 128,132 ---- if {$lastpos == $curpos} { set chk_surf($surfname) "S" ! send_file_to_ogl [format "S%s" $surfname] break } *************** Applied. tidy up *** 147,151 **** proc senduser {sname} { global chk_surf ! toggle_path $chk_surf($sname) $sname } --- 137,141 ---- proc senduser {sname} { global chk_surf ! send_file_to_ogl [format "%s%s" $chk_surf($sname) $sname] } *************** Applied. First parameter from visvip.c to ctl.tk now contains the names of the website-directory, session, and task. *** 459,474 **** # puts [format "titlefile: %s" [lindex $argv 1]] ! set wst [lindex $argv 1] set using_sb [lindex $argv 2] set filecount 0 - if [regexp {^sitedir=(.+):session=(.*):task=(.*)$} $wst \ - wst_all datadir session task ] { - ## puts "dst parsed: d=$datadir s=$session, t=$task" - } else { - puts "Parse of wst failed" - exit - } - # invoke special extension to interpreter to hook up to X connect_X --- 449,456 ---- # puts [format "titlefile: %s" [lindex $argv 1]] ! set title_filename [lindex $argv 1] set using_sb [lindex $argv 2] set filecount 0 # invoke special extension to interpreter to hook up to X connect_X *************** Applied -- split between proc select_site and top level code where select_site is called. Use session and task names as filters to get selected subset of *.up files to be (possibly) displayed. - i.e. this is what fills the menu of displayable paths. *** 480,501 **** } ! # set up list of filenames that look like *.up ! # Use session and task as filters. ! ! if {$session == ""} { ! set session "*" ! } ! ! if {$task == ""} { ! set task "*" } else { ! set task "*$task*" } ! ## puts "Use pattern: $datadir/sessions/$session/$task.up" ! set up_list [lsort [glob -nocomplain $datadir/sessions/$session/$task.up]] ! ## puts "raw up_list = $up_list" ! # set up list of users (of sessions, actually) set surfer_list {} set max_rel_time -1 --- 462,476 ---- } ! if [info exists env(VISVIP_WEBSITE)] { ! set datadir $env(VISVIP_WEBSITE) } else { ! set datadir "works/users" } ! ## puts "datadir = $datadir" ! # set up list of filenames that look like *.up ! set up_list [lsort [glob -nocomplain data/$datadir/*.up]] ! # set up list of users set surfer_list {} set max_rel_time -1 *************** set up list for menu of paths *** 503,509 **** foreach surf_name $up_list { ! if [regexp {([^/]+)/([^/]+)\.up$} \ ! $surf_name whole_match this_sess this_task] { ! ## puts "regexp found: $this_sess" } else { puts "regexp failed on: $surf_name" --- 478,484 ---- foreach surf_name $up_list { ! if [regexp {/([a-zA-Z0-9\_-]+)\.up$} \ ! $surf_name whole_match this_surf] { ! ## puts "regexp found: $this_surf" } else { puts "regexp failed on: $surf_name" *************** Maybe this does not apply at all to the Windows version. In the Unix version, ctl.tk sends the session name and task name back to visvip *separately* - this is a good thing, because the dreaded 19-character limit now applies only to each level, not to the combined name. Maybe the 19-character limit doesn't affect the PC version? *** 510,530 **** } ! if {[string length $this_sess] > 19} { ! puts "WARNING: long name for session: $this_sess;" ! puts "session_name must be < 20 characters. Please re-name file." ! set longname 1 ! continue ! } ! if {[string length $this_task] > 19} { ! puts "WARNING: long name for task: $this_task;" ! puts "task_name must be < 20 characters. Please re-name file." set longname 1 - continue } - set sess_task "$this_sess/$this_task" - lappend surfer_list $sess_task - ## now read each file to get max_rel_time for all userpaths set total_time 0 --- 485,496 ---- } ! lappend surfer_list $this_surf ! if {[string length $this_surf] > 19} { ! puts "WARNING: long name for userpath: $this_surf;" ! puts "Prefix must be < 20 characters. Please re-name file." set longname 1 } ## now read each file to get max_rel_time for all userpaths set total_time 0 *************** Applied. sess_task is a more accurate variable name *** 539,544 **** } close $userfile ! set surf_time($sess_task) $total_time ! ## puts [format "time for %s = %d" $sess_task $total_time] if {$max_rel_time < $total_time} { set max_rel_time $total_time --- 505,510 ---- } close $userfile ! set surf_time($this_surf) $total_time ! ## puts [format "time for %s = %d" $this_surf $total_time] if {$max_rel_time < $total_time} { set max_rel_time $total_time *************** Applied. tidy up *** 554,560 **** set anim_time $max_rel_time - ## initialize session state here and in OpenGL process foreach surf_name $surfer_list { ! toggle_path "S" $surf_name set chk_surf($surf_name) "E" } --- 520,525 ---- set anim_time $max_rel_time foreach surf_name $surfer_list { ! send_file_to_ogl "S$surf_name" set chk_surf($surf_name) "E" } *************** Applied. Changed env to reg. New help contents for the new parameters to be accepted by VisVIP, and a new format for "tension" - make everything keyword=value. *** 667,701 **** "The location of the input data is set via an\ environmental variable. Prior to execution,\ ! say 'setenv WEBLOG_DATA /home/blah', and then VISVIP\ ! will look for its input in the directory '/home/blah'.\ Here are the command line parameters you can use when \ invoking VISVIP: - website=: This parameter is *mandatory*. It specifies\ - which sub-directory contains the information needed by VisVIP.\ - E.g. 'website=buystuff', together with the example above, implies\ - that the required input files exist within /home/blah/buystuff. - - session=: If present, indicates that the only paths\ - to be displayed are those within the named sub-directory. E.g.\ - 'session=harry' implies that only the paths within\ - /home/blah/buystuff/sessions/harry will be shown. If not present\ - then all the sessions sub-directories (/home/blah/buystuff/sessions/*)\ - are used. - - task=: If present, indicates that the only paths\ - to be displayed are those whose task names contain the string. E.g.\ - 'task=buy' implies that only the paths matching\ - /home/blah/buystuff/sessions/.../*buy*.up will be shown.\ - If not present then all the paths\ - (/home/blah/buystuff/sessions/.../*.up) are used.\ - Note that filtering by session and by task are independent - they\ - may be used in any combination. - - tension=: Controls the tension of the spline curves used to\ - represent the user-paths. The default is 1.0. Higher values\ - will generate a tighter, less smooth path; lower values will\ - generate a looser, smoother path. - -sync: forces completion of drawing before looking at input; good for\ slower platforms. --- 632,640 ---- "The location of the input data is set via an\ environmental variable. Prior to execution,\ ! say 'setenv VISVIP_WEBSITE blah', and then VISVIP\ ! will look for its input in the subdirectory 'data/blah'.\ Here are the command line parameters you can use when \ invoking VISVIP: -sync: forces completion of drawing before looking at input; good for\ slower platforms. *************** Applied. put all the keyword-value parameters together. *** 720,724 **** -thin: draw future segments of userpaths as thin splines, past segments\ ! as thick lines. The default is not to draw future segments at all."} pack .hlp.lbl .hlp.vv .hlp.pick .hlp.nt .hlp.parm \ --- 659,668 ---- -thin: draw future segments of userpaths as thin splines, past segments\ ! as thick lines. The default is not to draw future segments at all. ! ! -tension : Controls the tension of the spline curves used to\ ! represent the user-paths. The default is 1.0. Higher values\ ! will generate a tighter, less smooth path; lower values will\ ! generate a looser, smoother path."} pack .hlp.lbl .hlp.vv .hlp.pick .hlp.nt .hlp.parm \ *************** Applied. tidy up - use toggle_path. *** 1022,1026 **** button .surf.surf_ctl.show_all -background $active_color -text "Show All" \ -command { foreach ix $surfer_list \ ! {set chk_surf($ix) "S"; toggle_path "S" $ix }; update_play_scale} button .surf.surf_ctl.remove_all -background $active_color -text "Hide All" \ --- 966,970 ---- button .surf.surf_ctl.show_all -background $active_color -text "Show All" \ -command { foreach ix $surfer_list \ ! {set chk_surf($ix) "S"; send_file_to_ogl "S$ix" }; update_play_scale} button .surf.surf_ctl.remove_all -background $active_color -text "Hide All" \ --------------288FE43A3E60F543189BF4B8 Content-Type: text/plain; charset=us-ascii; name="vv.dif" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vv.dif" Joe - here is visvip itself - John *** ../html/webmet/VisVIP/vv.c Fri Mar 29 11:21:26 2002 --- vv-from-webmet/visvip.c Tue Jan 9 10:15:44 2001 *************** Partial: "arg_key" and "arg_val" replaced with "this_arg" in WinMain(). Some new variables to hold new parameters: website, session, and task. *** 172,182 **** GLfloat spin_incr = -0.2; ! char tree_build_code, *this_arg, using_z_rot, using_sb; ! char rand_init, pressed_char, cmd_string[500], *cl_msg, inbuf[300]; ! char session_name[300] = "", sess_name[22] = "", *message_str; ! char task_matcher[300] = "", task_name[44] = "", website_name[300] = ""; char *from_ptr, *to_ptr; char home_nickname[NICK_LEN], show_all, string_in[200]; ! char *mark_name, did_writeover, still_converging; char *url_ptr, url_buf[URL_BUF_LEN], picked_url[MAX_URL_LEN]; char stick_val, *pg_link_ptr, *page_conn, hostname[MAX_URL_LEN]; --- 172,180 ---- GLfloat spin_incr = -0.2; ! char tree_build_code, *arg_key, *arg_val, using_z_rot, using_sb; ! char rand_init, pressed_char, cmd_string[300], *cl_msg, inbuf[300]; char *from_ptr, *to_ptr; char home_nickname[NICK_LEN], show_all, string_in[200]; ! char *mark_name, *surf_name, did_writeover, still_converging; char *url_ptr, url_buf[URL_BUF_LEN], picked_url[MAX_URL_LEN]; char stick_val, *pg_link_ptr, *page_conn, hostname[MAX_URL_LEN]; *************** Renamed datadir to sitedir. Need tcl_buf to construct name of tcl script from $WEBMET_TOOLS *** 207,212 **** int abyss_mode, do_sync, flat_light = 0; ! char tcl_buf[300], *user_tcl_name, *tcl_name = "./ctl.tk"; ! char filename[300], sitedir[200], *datadir; FILE *upcol_file, *page_file, *link_file, *node_loc_file; --- 205,210 ---- int abyss_mode, do_sync, flat_light = 0; ! char *user_tcl_name, *tcl_name = "./ctl.tk"; ! char filename[100], sitedir[100], *datadir; FILE *upcol_file, *page_file, *link_file, *node_loc_file; *************** Applied. cosmetic *** 241,245 **** /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ ! printf ("\n\n\n--------------------------\nStart VISVIP \n"); /* mark as unfilled */ --- 239,243 ---- /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ ! printf ("Start VISVIP \n"); /* mark as unfilled */ *************** Applied all the following consecutive "this_arg" diffs. Use "this_arg" to clarify... *** 264,270 **** for (ix=1 ; ix < argc ; ix++) { - this_arg = argv[ix]; /* first handle single word arguments */ ! if (strcmp ("-sync", this_arg) == 0) { do_sync = 1; --- 262,267 ---- for (ix=1 ; ix < argc ; ix++) { /* first handle single word arguments */ ! if (strcmp ("-sync", argv[ix]) == 0) { do_sync = 1; *************** same *** 271,275 **** printf ("Using glFinish to sync input/output \n"); } ! else if (strcmp ("-nosync", this_arg) == 0) { do_sync = 0; --- 268,272 ---- printf ("Using glFinish to sync input/output \n"); } ! else if (strcmp ("-nosync", argv[ix]) == 0) { do_sync = 0; *************** same *** 276,280 **** printf ("NOT using glFinish to sync input/output \n"); } ! else if (strcmp ("-flat", this_arg) == 0) { flat_light = 1; --- 273,277 ---- printf ("NOT using glFinish to sync input/output \n"); } ! else if (strcmp ("-flat", argv[ix]) == 0) { flat_light = 1; *************** same *** 281,285 **** printf ("Using flat lighting. \n"); } ! else if (strcmp ("-nrinit", this_arg) == 0) { rand_init = 0; --- 278,282 ---- printf ("Using flat lighting. \n"); } ! else if (strcmp ("-nrinit", argv[ix]) == 0) { rand_init = 0; *************** same *** 286,290 **** printf ("Using non-random initialization. \n"); } ! else if (strcmp ("-nolabel", this_arg) == 0) { show_label = 0; --- 283,287 ---- printf ("Using non-random initialization. \n"); } ! else if (strcmp ("-nolabel", argv[ix]) == 0) { show_label = 0; *************** same *** 291,295 **** printf ("Omit nickname labels. \n"); } ! else if (strcmp ("-nobox", this_arg) == 0) { drawbox = 0; --- 288,292 ---- printf ("Omit nickname labels. \n"); } ! else if (strcmp ("-nobox", argv[ix]) == 0) { drawbox = 0; *************** same *** 296,300 **** printf ("Omit box sides. \n"); } ! else if (strcmp ("-echo", this_arg) == 0) { echo = 1; --- 293,297 ---- printf ("Omit box sides. \n"); } ! else if (strcmp ("-echo", argv[ix]) == 0) { echo = 1; *************** same *** 301,305 **** printf ("Echo drawing activity. \n"); } ! else if (strcmp ("-abyss", this_arg) == 0) { abyss_mode = 1; --- 298,302 ---- printf ("Echo drawing activity. \n"); } ! else if (strcmp ("-abyss", argv[ix]) == 0) { abyss_mode = 1; *************** same *** 306,310 **** printf ("Abyss mode set: handle unknown nodes on userpath \n"); } ! else if (strcmp ("-noabyss", this_arg) == 0) { abyss_mode = 0; --- 303,307 ---- printf ("Abyss mode set: handle unknown nodes on userpath \n"); } ! else if (strcmp ("-noabyss", argv[ix]) == 0) { abyss_mode = 0; *************** same *** 311,315 **** printf ("Abyss mode unset: dies if unknown nodes on userpath \n"); } ! else if (strcmp ("-unconn", this_arg) == 0) { show_all = 0; --- 308,312 ---- printf ("Abyss mode unset: dies if unknown nodes on userpath \n"); } ! else if (strcmp ("-unconn", argv[ix]) == 0) { show_all = 0; *************** same *** 316,320 **** printf ("Delete unconnected nodes.\n"); } ! else if (strcmp ("-nsb", this_arg) == 0) { using_sb = 'n'; --- 313,317 ---- printf ("Delete unconnected nodes.\n"); } ! else if (strcmp ("-nsb", argv[ix]) == 0) { using_sb = 'n'; *************** same *** 321,325 **** printf ("Not using spaceball. \n"); } ! else if (strcmp ("-sb", this_arg) == 0) { using_sb = 'y'; --- 318,322 ---- printf ("Not using spaceball. \n"); } ! else if (strcmp ("-sb", argv[ix]) == 0) { using_sb = 'y'; *************** same *** 326,330 **** printf ("Using spaceball. \n"); } ! else if (strcmp ("-thin", this_arg) == 0) { draw_thin = 1; --- 323,327 ---- printf ("Using spaceball. \n"); } ! else if (strcmp ("-thin", argv[ix]) == 0) { draw_thin = 1; *************** same *** 331,335 **** printf ("Draw future splines as thin.\n"); } ! else if (strcmp ("-zrot", this_arg) == 0) { using_z_rot = 'y'; --- 328,332 ---- printf ("Draw future splines as thin.\n"); } ! else if (strcmp ("-zrot", argv[ix]) == 0) { using_z_rot = 'y'; *************** Applied. OK, handle new keyword=value parameters here. *** 336,363 **** printf ("Using Z rotation. \n"); } ! else if (sscanf (this_arg, "tension=%f", &tension) == 1) { if (tension > 0) tension = -tension; printf ("Using tension = %f \n", -tension); } ! else if (sscanf (this_arg, "website=%s", website_name) == 1) ! { printf ("Website = %s \n", website_name); ! } ! else if (sscanf (this_arg, "session=%s", session_name) == 1) ! { printf ("Session = %s \n", session_name); ! } ! else if (sscanf (this_arg, "task=%s", task_matcher) == 1) ! { printf ("Task = %s \n", task_matcher); ! } ! else /* no clue ... */ { ! printf ("Unknown argument: %s \n", this_arg); exit (9); } } - - if (website_name[0] == '\0') - { printf ("Missing website= parameter. \n"); - exit (2); } --- 333,360 ---- printf ("Using Z rotation. \n"); } ! else ! /* handle keyword-value argument pairs */ ! { ! if (ix+1 >= argc) ! { ! printf ("Need a pair of arguments; one missing. \n"); ! exit (8); ! } ! ! arg_key = argv[ix]; ! arg_val = argv[++ix]; ! ! if (strcmp ("-tension", arg_key) == 0) { + sscanf (arg_val, "%f", &tension); if (tension > 0) tension = -tension; printf ("Using tension = %f \n", -tension); } ! else { ! printf ("Unknown argument: %s \n", arg_key); exit (9); } } } *************** Here's where we actually use the new environmental variables WEBMET_TOOLS and WEBLOG_DATA *** 410,433 **** /* *** *** first, find name of host of Xserver *** *** */ ! if (user_tcl_name = getenv("WEBMET_TOOLS")) ! { sprintf (tcl_buf, "%s/VisVIP/ctl.tk", user_tcl_name ); ! tcl_name = tcl_buf; ! } ! else ! { printf ("Done: cannot locate Tcl script for control menu. Please define WEBMET_TOOLS. \n" ); ! goto bad_end; ! } /* ENDIF: */ ! ! /* *** *** set up data directory *** *** */ ! ! if ( ! (datadir = getenv("WEBLOG_DATA"))) ! { printf ("WEBLOG_DATA undefined - please setenv and re-run. \n"); ! goto bad_end; ! } ! sprintf (sitedir, "%s/%s", datadir, website_name); ! sprintf (cmd_string, "%s %d sitedir=%s:session=%s:task=%s %c &", ! tcl_name, visvip_cvs.window, ! sitedir, session_name, task_matcher, using_sb); printf ("Tcl cmd = %s\n", cmd_string); system (cmd_string); --- 407,415 ---- /* *** *** first, find name of host of Xserver *** *** */ ! if (user_tcl_name = getenv("VISVIP_TCL")) ! tcl_name = user_tcl_name; ! sprintf (cmd_string, "%s %d %s %c &", ! tcl_name, visvip_cvs.window, "dummy", using_sb); printf ("Tcl cmd = %s\n", cmd_string); system (cmd_string); *************** Applied. Get rid of old VISVIP_WEBSITE stuff *** 441,445 **** --- 423,442 ---- + /* *** *** set up data directory *** *** */ + + if (datadir = getenv("VISVIP_WEBSITE")) + /* OK */; + else + datadir = "works/users"; + + if ( ! (to_ptr = strchr (datadir, '/'))) + { printf ("No slash found in data directory: %s \n", datadir); + goto bad_end; + } /* ENDIF: */ + *to_ptr = '\0'; + strcpy (sitedir, datadir); + *to_ptr = '/'; + /* *** *** configure the OpenGL cluster context for rendering *** *** */ *************** Applied. Use new conventions for file location - webstruct, not data. *** 917,921 **** /* Use this for user-specified colors */ num_surf_colors = 0; ! sprintf (filename, "%s/webstruct/up_color.dat", sitedir); if ( upcol_file = fopen (filename, "r")) { /* fill in ad hoc user-color table */ --- 914,918 ---- /* Use this for user-specified colors */ num_surf_colors = 0; ! sprintf (filename, "data/%s/up-color.dat", datadir); if ( upcol_file = fopen (filename, "r")) { /* fill in ad hoc user-color table */ *************** Random mutation *** 928,932 **** num_surf_colors++; } /* ENDWHILE: */ ! } /* someday, set tree_start here = page location with --- 925,929 ---- num_surf_colors++; } /* ENDWHILE: */ ! } /* ENDIF: */ /* someday, set tree_start here = page location with *************** Applied. Use new conventions for file location - webstruct, not data. *** 1015,1019 **** /* printf ("Save node locations \n"); */ ! sprintf (filename, "%s/webstruct/node_loc.dat", sitedir); if ( ! (node_loc_file = fopen (filename, "w"))) { printf ("Cannot open node_loc file for output. \n"); --- 1012,1016 ---- /* printf ("Save node locations \n"); */ ! sprintf (filename, "data/%s/node_loc.dat", sitedir); if ( ! (node_loc_file = fopen (filename, "w"))) { printf ("Cannot open node_loc file for output. \n"); *************** Applied. Use new conventions for file location - webstruct, not data. *** 1048,1052 **** /* printf ("Load node locations \n"); */ ! sprintf (filename, "%s/webstruct/node_loc.dat", sitedir); if ( ! (node_loc_file = fopen (filename, "r"))) { printf ("Cannot open node_loc file for input. \n"); --- 1045,1049 ---- /* printf ("Load node locations \n"); */ ! sprintf (filename, "data/%s/node_loc.dat", sitedir); if ( ! (node_loc_file = fopen (filename, "r"))) { printf ("Cannot open node_loc file for input. \n"); *************** Applied. "message_str" is a better variable name *** 1162,1166 **** else if (event_report.xclient.format == 8) { cl_msg = event_report.xclient.data.b; ! message_str = event_report.xclient.data.b + 1; /* printf ("OGL: 8-ClMsg to VIP; data = ***%s***.\n", cl_msg ); --- 1159,1163 ---- else if (event_report.xclient.format == 8) { cl_msg = event_report.xclient.data.b; ! surf_name = event_report.xclient.data.b + 1; /* printf ("OGL: 8-ClMsg to VIP; data = ***%s***.\n", cl_msg ); *************** Applied. Here's where visvip gets the session and task name separately. *** 1169,1180 **** switch (cl_msg[0]) { ! case 'N': /* get the session name for path ops */ ! strcpy (sess_name, message_str); ! break; ! ! case 'S': /* task name for path */ ! /* printf ("SHOW: %s \n", message_str); */ ! sprintf (task_name, "%s/%s", sess_name, message_str); ! this_surfer = find_surfer (task_name); if (this_surfer < 0) --- 1166,1172 ---- switch (cl_msg[0]) { ! case 'S': ! /* printf ("SHOW: %s \n", surf_name); */ ! this_surfer = find_surfer (surf_name); if (this_surfer < 0) *************** Applied. better variable names *** 1191,1198 **** if (err_code = ! load_surfer (sitedir, task_name, abyss_mode)) { printf ("Could not load %s, code=%d. \n", ! task_name, err_code); goto bad_end; } /* ENDIF: */ --- 1183,1190 ---- if (err_code = ! load_surfer (datadir, surf_name, abyss_mode)) { printf ("Could not load %s, code=%d. \n", ! surf_name, err_code); goto bad_end; } /* ENDIF: */ *************** Applied. better variable names *** 1201,1205 **** printf ("Loaded %s, ttime=%d \n", ! task_name, surfer[this_surfer].total_path_time); if (max_rel_time < surfer[this_surfer].total_path_time) --- 1193,1197 ---- printf ("Loaded %s, ttime=%d \n", ! surf_name, surfer[this_surfer].total_path_time); if (max_rel_time < surfer[this_surfer].total_path_time) *************** Applied, better variable names *** 1249,1257 **** if (surfer[this_surfer] . visible == 'y') { ! printf ("%s already visible \n", task_name); } else { ! /* printf ("%s made visible \n", task_name); */ surfer[this_surfer] . visible = 'y'; need_select_users = JC_EVENTUALLY; --- 1241,1249 ---- if (surfer[this_surfer] . visible == 'y') { ! printf ("%s already visible \n", surf_name); } else { ! /* printf ("%s made visible \n", surf_name); */ surfer[this_surfer] . visible = 'y'; need_select_users = JC_EVENTUALLY; *************** Applied. now, have to preface task-name with session-name *** 1260,1266 **** case 'E': ! /* printf ("ERASE: %s \n", message_str); */ ! sprintf (task_name, "%s/%s", sess_name, message_str); ! this_surfer = find_surfer (task_name); if (this_surfer < 0) --- 1252,1257 ---- case 'E': ! /* printf ("ERASE: %s \n", surf_name); */ ! this_surfer = find_surfer (surf_name); if (this_surfer < 0) *************** Applied. variable names again *** 1270,1278 **** else if (surfer[this_surfer] . visible == 'n') { ! printf ("%s already invisible \n", task_name); } else { ! /* printf ("%s made invisible \n", task_name); */ surfer[this_surfer] . visible = 'n'; need_select_users = JC_EVENTUALLY; --- 1261,1269 ---- else if (surfer[this_surfer] . visible == 'n') { ! printf ("%s already invisible \n", surf_name); } else { ! /* printf ("%s made invisible \n", surf_name); */ surfer[this_surfer] . visible = 'n'; need_select_users = JC_EVENTUALLY; *************** Applied. variable names again *** 1281,1286 **** case 'M': ! /* printf ("MARK:%s \n", message_str); */ ! mark_name = message_str; if (*mark_name) need_mark_nodes = JC_EVENTUALLY; --- 1272,1277 ---- case 'M': ! /* printf ("MARK:%s \n", surf_name); */ ! mark_name = surf_name; if (*mark_name) need_mark_nodes = JC_EVENTUALLY; *************** Applied. Use new conventions for file location - webstruct, not data. *** 1581,1585 **** need_reload_website = JC_NOPE; ! sprintf (filename, "%s/webstruct/pages.dat", sitedir); if ( ! (page_file = fopen (filename, "r"))) { printf ("Cannot open page file for input. \n"); --- 1572,1576 ---- need_reload_website = JC_NOPE; ! sprintf (filename, "data/%s/pages.dat", sitedir); if ( ! (page_file = fopen (filename, "r"))) { printf ("Cannot open page file for input. \n"); *************** Applied. Use new conventions for file location - webstruct, not data. *** 1676,1680 **** memset (page_link, '.', num_pages * num_pages ); ! sprintf (filename, "%s/webstruct/links.dat", sitedir); if ( ! (link_file = fopen (filename, "r"))) { printf ("Cannot open link file for input. \n"); --- 1667,1671 ---- memset (page_link, '.', num_pages * num_pages ); ! sprintf (filename, "data/%s/links.dat", sitedir); if ( ! (link_file = fopen (filename, "r"))) { printf ("Cannot open link file for input. \n"); --------------288FE43A3E60F543189BF4B8--