From: Zdeněk Šustr Date: Tue, 4 Sep 2012 10:52:11 +0000 (+0000) Subject: Use generated naming array instead of switch() X-Git-Tag: glite-lb-client_R_5_2_5_1~13 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d303b92a5974d94f74606a3d7fa75743bcb53e0b;p=jra1mw.git Use generated naming array instead of switch() --- diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index 16d4d45..a42b2e5 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -222,38 +222,7 @@ static void printstat(edg_wll_JobStat stat, int level) printf("%sjobId : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.jobId)); free(j1); printf("%sowner : %s\n", ind, stat.owner); printf("%spayload_owner : %s\n", ind, stat.payload_owner); - switch (stat.jobtype) { - case EDG_WLL_STAT_SIMPLE: - printf("%sjobtype : SIMPLE\n", ind); - break; - case EDG_WLL_STAT_DAG: - printf("%sjobtype : DAG\n", ind); - break; - case EDG_WLL_STAT_COLLECTION: - printf("%sjobtype : COLLECTION\n", ind); - break; - case EDG_WLL_STAT_PBS: - printf("%sjobtype : PBS\n", ind); - break; - case EDG_WLL_STAT_CONDOR: - printf("%sjobtype : CONDOR\n", ind); - break; - case EDG_WLL_STAT_CREAM: - printf("%sjobtype : CREAM\n", ind); - break; - case EDG_WLL_STAT_FILE_TRANSFER: - printf("%sjobtype : FILE_TRANSFER\n", ind); - break; - case EDG_WLL_STAT_FILE_TRANSFER_COLLECTION: - printf("%sjobtype : FILE_TRANSFER_COLLECTION\n", ind); - break; - case EDG_WLL_STAT_VIRTUAL_MACHINE: - printf("%sjobtype : VIRTUAL_MACHINE\n", ind); - break; - default: - printf("%sjobtype : UNKNOWN\n", ind); - break; - } + printf("%sjobtype : %s\n", ind, edg_wll_StatusJobtypeNames[stat.jobtype]); printf("%sparent_job : %s\n", ind, j2 = edg_wlc_JobIdUnparse(stat.parent_job)); if (stat.jobtype) {;