Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e2aec50

Browse files
committed
Replace foo/bar to l1/l2.
1 parent d370849 commit e2aec50

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

src/backend/nodes/list.c

+43-43
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.7 1997/09/08 21:44:04 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.8 1997/12/19 16:54:15 momjian Exp $
1111
*
1212
* NOTES
1313
* XXX a few of the following functions are duplicated to handle
@@ -278,19 +278,19 @@ nreverse(List *list)
278278
* XXX only good for IntList -ay
279279
*/
280280
bool
281-
same(List *foo, List *bar)
281+
same(List *l1, List *l2)
282282
{
283283
List *temp = NIL;
284284

285-
if (foo == NULL)
286-
return (bar == NULL);
287-
if (bar == NULL)
288-
return (foo == NULL);
289-
if (length(foo) == length(bar))
285+
if (l1 == NULL)
286+
return (l2 == NULL);
287+
if (l2 == NULL)
288+
return (l1 == NULL);
289+
if (length(l1) == length(l2))
290290
{
291-
foreach(temp, foo)
291+
foreach(temp, l1)
292292
{
293-
if (!intMember(lfirsti(temp), bar))
293+
if (!intMember(lfirsti(temp), l2))
294294
return (false);
295295
}
296296
return (true);
@@ -300,21 +300,21 @@ same(List *foo, List *bar)
300300
}
301301

302302
List *
303-
LispUnion(List *foo, List *bar)
303+
LispUnion(List *l1, List *l2)
304304
{
305305
List *retval = NIL;
306306
List *i = NIL;
307307
List *j = NIL;
308308

309-
if (foo == NIL)
310-
return (bar); /* XXX - should be copy of bar */
309+
if (l1 == NIL)
310+
return (l2); /* XXX - should be copy of l2 */
311311

312-
if (bar == NIL)
313-
return (foo); /* XXX - should be copy of foo */
312+
if (l2 == NIL)
313+
return (l1); /* XXX - should be copy of l1 */
314314

315-
foreach(i, foo)
315+
foreach(i, l1)
316316
{
317-
foreach(j, bar)
317+
foreach(j, l2)
318318
{
319319
if (!equal(lfirst(i), lfirst(j)))
320320
{
@@ -323,7 +323,7 @@ LispUnion(List *foo, List *bar)
323323
}
324324
}
325325
}
326-
foreach(i, bar)
326+
foreach(i, l2)
327327
{
328328
retval = lappend(retval, lfirst(i));
329329
}
@@ -332,21 +332,21 @@ LispUnion(List *foo, List *bar)
332332
}
333333

334334
List *
335-
LispUnioni(List *foo, List *bar)
335+
LispUnioni(List *l1, List *l2)
336336
{
337337
List *retval = NIL;
338338
List *i = NIL;
339339
List *j = NIL;
340340

341-
if (foo == NIL)
342-
return (bar); /* XXX - should be copy of bar */
341+
if (l1 == NIL)
342+
return (l2); /* XXX - should be copy of l2 */
343343

344-
if (bar == NIL)
345-
return (foo); /* XXX - should be copy of foo */
344+
if (l2 == NIL)
345+
return (l1); /* XXX - should be copy of l1 */
346346

347-
foreach(i, foo)
347+
foreach(i, l1)
348348
{
349-
foreach(j, bar)
349+
foreach(j, l2)
350350
{
351351
if (lfirsti(i) != lfirsti(j))
352352
{
@@ -355,7 +355,7 @@ LispUnioni(List *foo, List *bar)
355355
}
356356
}
357357
}
358-
foreach(i, bar)
358+
foreach(i, l2)
359359
{
360360
retval = lappendi(retval, lfirsti(i));
361361
}
@@ -365,27 +365,27 @@ LispUnioni(List *foo, List *bar)
365365

366366
/*
367367
* member()
368-
* - nondestructive, returns t iff foo is a member of the list
369-
* bar
368+
* - nondestructive, returns t iff l1 is a member of the list
369+
* l2
370370
*/
371371
bool
372-
member(void *foo, List *bar)
372+
member(void *l1, List *l2)
373373
{
374374
List *i;
375375

376-
foreach(i, bar)
377-
if (equal((Node *) (lfirst(i)), (Node *) foo))
376+
foreach(i, l2)
377+
if (equal((Node *) (lfirst(i)), (Node *) l1))
378378
return (true);
379379
return (false);
380380
}
381381

382382
bool
383-
intMember(int foo, List *bar)
383+
intMember(int l1, List *l2)
384384
{
385385
List *i;
386386

387-
foreach(i, bar)
388-
if (foo == lfirsti(i))
387+
foreach(i, l2)
388+
if (l1 == lfirsti(i))
389389
return (true);
390390
return (false);
391391
}
@@ -473,34 +473,34 @@ intLispRemove(int elem, List *list)
473473
#endif
474474

475475
List *
476-
set_difference(List *list1, List *list2)
476+
set_difference(List *l1, List *l2)
477477
{
478478
List *temp1 = NIL;
479479
List *result = NIL;
480480

481-
if (list2 == NIL)
482-
return (list1);
481+
if (l2 == NIL)
482+
return (l1);
483483

484-
foreach(temp1, list1)
484+
foreach(temp1, l1)
485485
{
486-
if (!member(lfirst(temp1), list2))
486+
if (!member(lfirst(temp1), l2))
487487
result = lappend(result, lfirst(temp1));
488488
}
489489
return (result);
490490
}
491491

492492
List *
493-
set_differencei(List *list1, List *list2)
493+
set_differencei(List *l1, List *l2)
494494
{
495495
List *temp1 = NIL;
496496
List *result = NIL;
497497

498-
if (list2 == NIL)
499-
return (list1);
498+
if (l2 == NIL)
499+
return (l1);
500500

501-
foreach(temp1, list1)
501+
foreach(temp1, l1)
502502
{
503-
if (!intMember(lfirsti(temp1), list2))
503+
if (!intMember(lfirsti(temp1), l2))
504504
result = lappendi(result, lfirsti(temp1));
505505
}
506506
return (result);

0 commit comments

Comments
 (0)