]> andersk Git - moira.git/commitdiff
Changes to members.pc to make it build again, and Makefile.in fixes to
authorzacheiss <zacheiss>
Sun, 10 Sep 2000 02:53:27 +0000 (02:53 +0000)
committerzacheiss <zacheiss>
Sun, 10 Sep 2000 02:53:27 +0000 (02:53 +0000)
actually build it.

dbck/Makefile.in
dbck/members.pc

index 38eee4b3fe6757899b81a81551a0df5a1bdcd9f6..33b27d777bd88a7675b08b37fd8375bac105b346 100644 (file)
@@ -25,11 +25,13 @@ SRCTOP=@top_srcdir@
 BUILDTOP=..
 mrbindir=@mrbindir@
 
-OBJS=dbck.o fix.o phase1.o phase2.o phase3.o phase4.o
+DBCK_OBJS=dbck.o fix.o phase1.o phase2.o phase3.o phase4.o
+MEMBERS_OBJS=members.o
+OBJS= $(DBCK_OBJS) $(MEMBERS_OBJS)
 
-CFILES=dbck.c fix.c phase1.c phase2.c phase3.c phase4.c
+CFILES=dbck.c fix.c phase1.c phase2.c phase3.c phase4.c members.c
 
-TARGET=dbck
+TARGET=dbck members
 
 .SUFFIXES: .pc
 
@@ -51,6 +53,15 @@ depend: $(CFILES)
 
 install:
        $(INSTALL_PROGRAM) dbck $(mrbindir)
+       $(INSTALL_PROGRAM) members $(mrbindir)
+
+dbck: $(DBCK_OBJS) $(MR_LIBDEP)
+       $(CC) -o $@ $(LDFLAGS) $(DBCK_OBJS) $(LIBS)
+
+members: members.o $(MR_LIBDEP)
+       $(CC) -o $@ $(LDFLAGS) members.o $(LIBS)
+
+
+
+
 
-$(TARGET): $(OBJS) $(MR_LIBDEP)
-       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
index 2cfdf027a4a99e5de21c6352156063d79ef117af..1655f3c6e0bb139866fba91f8bd10aecb82ff821 100644 (file)
@@ -45,6 +45,7 @@ struct hash *lists, *members;
 void fix_member(), display_member();
 int debug = 0, records = 0;
 
+char *db = "moira/moira";
 
 main(argc, argv)
 int argc;
@@ -58,7 +59,7 @@ char **argv;
 #endif DEBUG
 
 /*  ingres sms */
-    EXEC SQL CONNECT moira;
+    EXEC SQL CONNECT :db;
 /*  begin transaction */
 /*  range of m is imembers */
     /* No equivalent */
@@ -332,8 +333,10 @@ fix_members()
  *             and m.member_type = mtype */
        EXEC SQL DELETE FROM imembers WHERE list_id = :list_id AND
            member_id = :member_id AND member_type = :mtype;
-       EXEC SQL INQUIRE_SQL(:rowcount = rowcount); 
-       printf("  %d rows deleted\n", rowcount);
+       rowcount = sqlca.sqlerrd[2];
+       if (rowcount > 0)
+         printf("%d entr%s deleted\n", rowcount, 
+                rowcount == 1 ? "y" : "ies");
 #endif FIXERRORS
     }
     if (errmis > 0)
@@ -484,8 +487,10 @@ int *errmis;
            EXEC SQL INSERT INTO imembers (list_id, member_id, 
                member_type, ref_count, direct)
              VALUES (:list_id, :member_id, :mtype, :ref_count, :dflag);
-           EXEC SQL INQUIRE_SQL(:rowcount = rowcount); 
-           printf("  %d rows added\n", rowcount);
+           rowcount = sqlca.sqlerrd[2];
+           if (rowcount > 0)
+             printf("%d entr%s added\n", rowcount, 
+                    rowcount == 1 ? "y" : "ies");
 #endif FIXERRORS
            continue;
        }
@@ -514,8 +519,10 @@ int *errmis;
            SET ref_count=ref_count+:ref_count, direct = :dflag 
            WHERE list_id = :list_id AND member_id = :member_id AND
                member_tpe = :mtype;
-       EXEC SQL INQUIRE_SQL(:rowcount = rowcount); 
-       printf("  %d rows fixed\n", rowcount);
+       rowcount = sqlca.sqlerrd[2];
+       if (rowcount > 0)
+         printf("%d entr%s updated\n", rowcount, 
+                rowcount == 1 ? "y" : "ies");
 #endif FIXERRORS
     }
 }
This page took 0.172883 seconds and 5 git commands to generate.