Skip to content

Commit

Permalink
Remove all "register" modifiers in cl and ecl
Browse files Browse the repository at this point in the history
In modern languages, the "register" modifier is ignored, and the
variables are placed in the register by the compiler's decision.
  • Loading branch information
olebole committed Apr 8, 2024
1 parent 189d0b3 commit e72b754
Show file tree
Hide file tree
Showing 64 changed files with 715 additions and 715 deletions.
6 changes: 3 additions & 3 deletions pkg/cl/binop.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define RIGHTSIDE 1

char *
strint (register char *s, int side)
strint (char *s, int side)
{
if (side == LEFTSIDE) {
while (isdigit (*s))
Expand Down Expand Up @@ -75,7 +75,7 @@ strint (register char *s, int side)
void
binop (int opcode)
{
register int typ1, typ2;
int typ1, typ2;
struct operand o1, o2, result;
char res[2*SZ_LINE];
char *o1sp;
Expand Down Expand Up @@ -545,7 +545,7 @@ binop (int opcode)
void
binexp (int opcode)
{
register int typ1, typ2;
int typ1, typ2;
struct operand o1, o2, result;
int strres=0, dostr=0;

Expand Down
28 changes: 14 additions & 14 deletions pkg/cl/bkg.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ bkg_spawn (
char *cmd /* command entered by user to spawn job */
)
{
register struct _bkgjob *bk;
register int jobno, stat;
struct _bkgjob *bk;
int jobno, stat;
int curpid = c_getpid();

/* Find first unused slot in a circular search.
Expand Down Expand Up @@ -183,9 +183,9 @@ bkg_spawn (
* all bkg jobs to terminate.
*/
void
bkg_wait (register int job)
bkg_wait (int job)
{
register int j;
int j;
int active_jobs;

if (job < 0 || job > NBKG)
Expand Down Expand Up @@ -213,8 +213,8 @@ bkg_wait (register int job)
void
bkg_kill (int job)
{
register struct _bkgjob *bk;
register int j;
struct _bkgjob *bk;
int j;

bkg_update (1);
if (job < 0 || job > NBKG)
Expand Down Expand Up @@ -253,9 +253,9 @@ bkg_jobstatus (
int job /* job(s) */
)
{
register struct _bkgjob *bk;
register int j, n, ch;
register char *ip;
struct _bkgjob *bk;
int j, n, ch;
char *ip;
long seconds;

bkg_update (1);
Expand Down Expand Up @@ -327,8 +327,8 @@ bkg_update (
int pmsg /* print event messages */
)
{
register struct _bkgjob *bk;
register int j;
struct _bkgjob *bk;
int j;

for (bk=jobtable, j=1; j <= NBKG; j++, bk++) {
if (busy(j)) {
Expand All @@ -355,7 +355,7 @@ bkg_close (
int pmsg /* print termination message */
)
{
register struct _bkgjob *bk = &jobtable[job-1];
struct _bkgjob *bk = &jobtable[job-1];

bk->b_clock = c_clktime (bk->b_clock);
bk->b_exitcode = c_prcldpr (bk->b_jobno);
Expand Down Expand Up @@ -418,8 +418,8 @@ bkg_delfiles (int job)
void
bkg_abort (void)
{
register int job;
register struct task *tp;
int job;
struct task *tp;

for (job=1; job <= NBKG; job++)
if (busy (job))
Expand Down
Loading

0 comments on commit e72b754

Please sign in to comment.