From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29274 invoked by alias); 17 May 2002 21:29:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29248 invoked from network); 17 May 2002 21:29:26 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 17 May 2002 21:29:26 -0000 Received: from makita.cygnus.com (makita.sfbay.redhat.com [192.168.30.83]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA10434 for ; Fri, 17 May 2002 14:29:25 -0700 (PDT) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id OAA04650 for ; Fri, 17 May 2002 14:29:25 -0700 (PDT) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Fri, 17 May 2002 14:29:00 -0000 From: Keith Seitz X-X-Sender: To: Subject: [RFC/MI] Renumber enum mi_cmd_result Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-05/txt/msg00761.txt.bz2 Hi, I've been looking over Apple's MI changes, so expect to see quite a few questions/changes/patches/debates/documentation updates/etc in the coming weeks on MI. This simple patch renumbers enum mi_cmd_result so that it starts at one instead of zero. This is necessary because MI_CMD_DONE would be indistinguishable from an error condition (both would return zero to catch_errors). I have run the testsuite before and after this change, and it produces no differences. (Okay, this is almost too simple to leave by itself, but, gotta start somewhere!) Keith ChangeLog 2002-05-17 Keith Seitz From Jim Ingham : * mi-cmds.h (enum mi_cmd_result): Start numbering at one instead of zero so that errors can be distinguished from other status returns. Patch Index: mi/mi-cmds.h =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmds.h,v retrieving revision 1.5 diff -p -r1.5 mi-cmds.h *** mi/mi-cmds.h 6 Mar 2001 08:21:45 -0000 1.5 --- mi/mi-cmds.h 17 May 2002 21:14:43 -0000 *************** *** 27,34 **** enum mi_cmd_result { /* Report the command as ``done''. Display both the ``NNN^done'' ! message and the completion prompt. */ ! MI_CMD_DONE = 0, /* The command is still running in the forground. Main loop should display the completion prompt. */ MI_CMD_FORGROUND, --- 27,36 ---- enum mi_cmd_result { /* Report the command as ``done''. Display both the ``NNN^done'' ! message and the completion prompt. Start this at 1 so that ! you can distinguish ALL these returns from the 0 of an error ! in catch_errors. */ ! MI_CMD_DONE = 1, /* The command is still running in the forground. Main loop should display the completion prompt. */ MI_CMD_FORGROUND,