HEX
Server: Apache
System: Linux dinesh8149 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: usesambura1 (1212012)
PHP: 7.0.33
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/share/graphviz/gvpr/addranks
/* Assuming nodes have been positioned by dot, this adds a rank
 * attribute by placing all nodes with the same y value on a specific
 * integer rank.
 * If the graph has rankdir=LR, x and y are flipped.
 */
BEG_G {
  double x,y;
  int lv[double];
  int r, rk[double];
  int flip;
  if (isAttr($,"G","rankdir") && $.rankdir=="LR") flip = 1;
}
N {
  sscanf($.pos,"%f,%f",&x,&y);
  if (flip) lv[x] = 1;
  else lv[y] = 1;
}
BEG_G {
  r = 0;
  if (flip)
    forr (lv[x]) {
      rk[x] = r++;
      /* printf (2, "rk[%f] = %d\n", y, rk[y]); */
    }
  else
    forr (lv[y]) {
      rk[y] = r++;
      /* printf (2, "rk[%f] = %d\n", y, rk[y]); */
    }
}
N {
  sscanf($.pos,"%f,%f",&x,&y);
  /* printf(2, "node %s y %f rk %d\n", $.name, y, rk[y]); */
  if (flip) $.rank = sprintf("%d", rk[x]); 
  else $.rank = sprintf("%d", rk[y]); 
}