search for: colspace

Displaying 4 results from an estimated 4 matches for "colspace".

2006 Apr 20
0
Sanity check of my Draggable code
...with script.aculo.us, and prototype etc. My first mini-project was to use Draggable to adjust the column widths in a page. Here''s the code (which seems to work) and any feedback would be appreciated - especially if I''m doing things the wrong way. Here''s the code: var colSpacer function initPage() { colSpacer = new Draggable(''colspacer'', { revert:false, constraint:''horizontal'', change: function (d) { dragColTo(d.currentDelta()) } }); } function dragColTo(delta) { var x = delta[0]; if(x < 10) { ret...
2003 Oct 13
1
Problem in sftp 'ls' command output
.../* Count entries for sort and find longest filename */ for (n = 0; d[n] != NULL; n++) m = MAX(m, strlen(d[n]->filename)); if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) width = ws.ws_col; columns = width / (m + 2); columns = MAX(columns, 1); colspace = width / columns; } -------- which aims to compute the column width and column spacing. But when printing, a few lines below, we perform : -------- tmp = path_append(path, d[n]->filename); fname = path_strip(tmp, strip_path); xfree(tmp); if (lflag & LONG_VIEW) { /* irrelevant code */ } e...
2007 Dec 12
0
Revisiting sftp tab completion patch
...}, + { "?", I_HELP, NOARGS }, + { NULL, -1, -1} }; int interactive_loop(int fd_in, int fd_out, char *file1, char *file2); @@ -1344,13 +1357,237 @@ return ("sftp> "); } +void +complete_display(char **list, u_int len) +{ + u_int y, m = 0, width = 80, columns = 1, colspace = 0; + struct winsize ws; + + /* Count entries for sort and find longest filename */ + for (y = 0; list[y]; y++) + m = MAX(m, strlen(list[y])); + + if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) + width = ws.ws_col; + + m -= len; + columns = width / (m + 2); + columns = MAX(columns, 1); +...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all Im using sftp 1:4.7p1-8ubuntu1.2 in a batchjob Ive noticed that sftp needs a long time for sending a filelist. The timespan increases exponential if many files are on the remoteserver. for example "ls -la *.txt" needs 10 seconds for 2000 files but needs 50 seconds for 4000 files. For 150.000 Files i have to wait 15 minutes for example but the