*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
xjack_reshape (dpy, window, st, st->xgwa.width, st->xgwa.height);
xjack_reshape (dpy, window, st, st->xgwa.width, st->xgwa.height);
- if (st->columns >= 21)
- {
- st->left = 0xFF & (random() % ((st->columns / 2)+1));
- st->right = st->left + (0xFF & (random() % (st->columns - st->left - 10)
- + 10));
- }
- st->x = 0;
+ st->left = 0xFF & (random() % ((st->columns / 2)+1));
+ st->right = st->left + (0xFF & (random() % (st->columns - st->left)
+ + 10));
+ if (st->right < st->left + 10) st->right = st->left + 10;
+ if (st->right > st->columns) st->right = st->columns;
+
+ st->x = st->left;
if (st->break_para)
st->scrolling++;
/* but sometimes scroll by a whole page */
if (0 == (random() % 100))
st->scrolling += st->rows;
if (st->break_para)
st->scrolling++;
/* but sometimes scroll by a whole page */
if (0 == (random() % 100))
st->scrolling += st->rows;