*
* 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
if (st->right > st->columns) st->right = st->columns;
if (st->left > st->columns-20) st->left = st->columns-20;
if (st->left < 0) st->left = 0;
if (st->right > st->columns) st->right = st->columns;
if (st->left > st->columns-20) st->left = st->columns-20;
if (st->left < 0) st->left = 0;
st->s = source;
st->delay = get_integer_resource (st->dpy, "delay", "Integer");
fontname = get_string_resource (st->dpy, "font", "Font");
st->s = source;
st->delay = get_integer_resource (st->dpy, "delay", "Integer");
fontname = get_string_resource (st->dpy, "font", "Font");
gcv.font = st->font->fid;
gcv.foreground = get_pixel_resource (st->dpy, st->xgwa.colormap,
"foreground", "Foreground");
gcv.font = st->font->fid;
gcv.foreground = get_pixel_resource (st->dpy, st->xgwa.colormap,
"foreground", "Foreground");
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;