1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtmail: remove register keyword

This commit is contained in:
Jon Trulson 2018-06-27 17:29:25 -06:00
parent 88dd3b2c71
commit d0a4f777d8
12 changed files with 82 additions and 82 deletions

View file

@ -169,7 +169,7 @@ static char *phrase(char *, int , int );
char * char *
savestr(char *str) savestr(char *str)
{ {
register char *cp, *cp2, *top; char *cp, *cp2, *top;
for (cp = str; *cp; cp++) for (cp = str; *cp; cp++)
; ;
@ -233,8 +233,8 @@ dispname(const char *hdr)
static char * static char *
phrase(char *name, int token, int comma) phrase(char *name, int token, int comma)
{ {
register char c; char c;
register char *cp, *cp2; char *cp, *cp2;
char *bufend, *nbufp; char *bufend, *nbufp;
int gotlt, lastsp, didq; int gotlt, lastsp, didq;
char nbuf[LINESIZE]; char nbuf[LINESIZE];

View file

@ -308,7 +308,7 @@ void DtMailGenDialog::verify(XmTextVerifyPtr cbs)
{ {
int i; int i;
static char buffer[MAXPATHLEN]; static char buffer[MAXPATHLEN];
register char *s, *t; char *s, *t;
#if defined(SHROUDED_TEXTFIELD_DEBUG) #if defined(SHROUDED_TEXTFIELD_DEBUG)
printf( printf(

View file

@ -161,7 +161,7 @@ void EncryptedTextFieldUiItem::verify(XmTextVerifyPtr cbs)
{ {
int i; int i;
static char buffer[MAXPATHLEN]; static char buffer[MAXPATHLEN];
register char *s, *t; char *s, *t;
#if defined(ENCRYPTED_TEXTFIELD_DEBUG) #if defined(ENCRYPTED_TEXTFIELD_DEBUG)
printf( printf(

View file

@ -73,7 +73,7 @@
void void
FindDialog::clear() FindDialog::clear()
{ {
register unsigned int offset; unsigned int offset;
// //
if (_text_labels != NULL) { if (_text_labels != NULL) {
@ -239,7 +239,7 @@ FindDialog::createWorkArea(Widget dialog)
Widget *label = new Widget[_num_text_fields]; Widget *label = new Widget[_num_text_fields];
register unsigned int offset; unsigned int offset;
_name = GETMSG(DT_catd, 1, 192, "Mailer - Find"); _name = GETMSG(DT_catd, 1, 192, "Mailer - Find");
@ -364,7 +364,7 @@ FindDialog::createWorkArea(Widget dialog)
// //
#define TIGHTNESS 20 #define TIGHTNESS 20
register Widget widget; Widget widget;
Widget fd_action = XtVaCreateWidget("actionArea", Widget fd_action = XtVaCreateWidget("actionArea",
xmFormWidgetClass, xmFormWidgetClass,
@ -500,12 +500,12 @@ FindDialog::findMatching(Boolean findAll)
// //
// A pointer to the currently interesting message. // A pointer to the currently interesting message.
// //
register DtMailMessageHandle currentHandle = NULL; DtMailMessageHandle currentHandle = NULL;
// //
// The offset of the currentHandle in the MsgScrollingList. // The offset of the currentHandle in the MsgScrollingList.
// //
register int handleOffset; int handleOffset;
// //
// Find the current message. We would always start from the // Find the current message. We would always start from the
@ -657,7 +657,7 @@ Boolean
FindDialog::compareMessage(DtMailMessageHandle handle) FindDialog::compareMessage(DtMailMessageHandle handle)
{ {
Boolean found = False; Boolean found = False;
register unsigned int offset; unsigned int offset;
// //
// Check for something to do. // Check for something to do.
@ -740,9 +740,9 @@ FindDialog::strcasestr(const char *str, const char *toFind)
const char *result = NULL; // Default to not found. const char *result = NULL; // Default to not found.
if (str && toFind) { // Sanity check if (str && toFind) { // Sanity check
register int offset = 0; int offset = 0;
register int lenToFind = strlen(toFind); int lenToFind = strlen(toFind);
register int lenStr = strlen(str); int lenStr = strlen(str);
// //
// If toFind == "", then return the entire string (like strstr()). // If toFind == "", then return the entire string (like strstr()).
@ -771,7 +771,7 @@ FindDialog::compareHeader(DtMailEnv & error,
DtMailValueSeq & header, DtMailValueSeq & header,
const char * cmpToString) const char * cmpToString)
{ {
register int headerOffset = header.length() - 1; int headerOffset = header.length() - 1;
error.clear(); error.clear();
@ -790,7 +790,7 @@ FindDialog::compareHeader(DtMailEnv & error,
void void
FindDialog::getAllFields() FindDialog::getAllFields()
{ {
register unsigned int offset; unsigned int offset;
for (offset = 0; offset < _num_text_fields; offset++) { for (offset = 0; offset < _num_text_fields; offset++) {
if (_text_fields[offset] != NULL) { if (_text_fields[offset] != NULL) {
@ -882,7 +882,7 @@ FindDialog::clearCallback(Widget /*button*/,
XtPointer /*call_data*/) XtPointer /*call_data*/)
{ {
FindDialog *findData = (FindDialog *)closure; FindDialog *findData = (FindDialog *)closure;
register unsigned int offset; unsigned int offset;
for (offset = 0; offset < findData->_num_text_fields; offset++) { for (offset = 0; offset < findData->_num_text_fields; offset++) {
if (findData->_text_fields[offset] != NULL) { if (findData->_text_fields[offset] != NULL) {

View file

@ -1496,7 +1496,7 @@ MsgScrollingList::select_all_and_display_last(
) )
{ {
register int item_pos; int item_pos;
int num_items; int num_items;
MsgHndArray * msgHandles = get_messages(); MsgHndArray * msgHandles = get_messages();
@ -1537,8 +1537,8 @@ MsgScrollingList::select_all_and_display_last(
unsigned int elements unsigned int elements
) )
{ {
register int handleOffset = 0; int handleOffset = 0;
register int item_pos; int item_pos;
error.clear(); error.clear();

View file

@ -114,8 +114,8 @@ Sort::sortMessages(MsgScrollingList *displayList,
messageRecord * messages = new messageRecord[numberMessages +2]; messageRecord * messages = new messageRecord[numberMessages +2];
register unsigned int offset; unsigned int offset;
register unsigned int msgno; unsigned int msgno;
DtMail::Message * msg = NULL; DtMail::Message * msg = NULL;
DtMail::Envelope * envelope = NULL; DtMail::Envelope * envelope = NULL;
@ -406,11 +406,11 @@ Sort::_msort (char * base,
int (*compar)(char **one, int (*compar)(char **one,
char **two)) char **two))
{ {
register int i; int i;
register int t; int t;
register int s; int s;
register int p; int p;
register int q; int q;
char *k1; char *k1;
char *k2; char *k2;
@ -508,8 +508,8 @@ Sort::_sortCmp(char ** one, char ** two)
// //
// Cast the pointers to the known type. // Cast the pointers to the known type.
// //
register messageRecord * first = (messageRecord *) *one; messageRecord * first = (messageRecord *) *one;
register messageRecord * second = (messageRecord *) *two; messageRecord * second = (messageRecord *) *two;
if (first->primary_key_str == NULL) if (first->primary_key_str == NULL)
{ {

View file

@ -159,7 +159,7 @@ static char *phrase(char *, int , int );
char * char *
savestr(char *str) savestr(char *str)
{ {
register char *cp, *cp2, *top; char *cp, *cp2, *top;
for (cp = str; *cp; cp++) for (cp = str; *cp; cp++)
; ;
@ -223,8 +223,8 @@ dispname(const char *hdr)
static char * static char *
phrase(char *name, int token, int comma) phrase(char *name, int token, int comma)
{ {
register char c; char c;
register char *cp, *cp2; char *cp, *cp2;
char *bufend, *nbufp; char *bufend, *nbufp;
int gotlt, lastsp, didq; int gotlt, lastsp, didq;
char nbuf[LINESIZE]; char nbuf[LINESIZE];

View file

@ -458,8 +458,8 @@ DtMail::MailRc::removeValue(DtMailEnv & error,
// return alternates list // return alternates list
const char * DtMail::MailRc::getAlternates(DtMailEnv &env) const char * DtMail::MailRc::getAlternates(DtMailEnv &env)
{ {
register int i; int i;
register struct hash *h; struct hash *h;
struct hash **table = (struct hash **)glob.g_alternates; struct hash **table = (struct hash **)glob.g_alternates;
int len; int len;
@ -799,7 +799,7 @@ void DtMail::MailRc::init_globals()
int int
DtMail::MailRc::load(char *name, char* line) DtMail::MailRc::load(char *name, char* line)
{ {
register FILE *in, *oldin; FILE *in, *oldin;
int ret=0; int ret=0;
if ((in = fopen(name, "r")) == NULL) { if ((in = fopen(name, "r")) == NULL) {
@ -828,7 +828,7 @@ DtMail::MailRc::load(char *name, char* line)
int int
DtMail::MailRc::commands(char* iline) DtMail::MailRc::commands(char* iline)
{ {
register int n; int n;
char *linebuf = new char[LINESIZE]; char *linebuf = new char[LINESIZE];
char *line = new char[LINESIZE]; char *line = new char[LINESIZE];
@ -1070,8 +1070,8 @@ int DtMail::MailRc::execute(char linebuf[])
int int
DtMail::MailRc::readline(FILE *ibuf, char *linebuf) DtMail::MailRc::readline(FILE *ibuf, char *linebuf)
{ {
register char *cp; char *cp;
register int c; int c;
int seennulls = 0; int seennulls = 0;
clearerr(ibuf); clearerr(ibuf);
@ -1122,7 +1122,7 @@ void DtMail::MailRc::unstack()
void *DtMail::MailRc::lex(char word[]) void *DtMail::MailRc::lex(char word[])
{ {
register struct cmd *cp; struct cmd *cp;
for (cp = &cmdtab[0]; cp->c_name != NOSTR; cp++) for (cp = &cmdtab[0]; cp->c_name != NOSTR; cp++)
if (DtMail::MailRc::isprefix(word, cp->c_name)) if (DtMail::MailRc::isprefix(word, cp->c_name))
@ -1137,7 +1137,7 @@ void *DtMail::MailRc::lex(char word[])
int DtMail::MailRc::isprefix(char *as1, char *as2) int DtMail::MailRc::isprefix(char *as1, char *as2)
{ {
register char *s1, *s2; char *s1, *s2;
s1 = as1; s1 = as1;
s2 = as2; s2 = as2;
@ -1154,9 +1154,9 @@ int DtMail::MailRc::isprefix(char *as1, char *as2)
int DtMail::MailRc::getrawlist(char line[], char **argv, int argc) int DtMail::MailRc::getrawlist(char line[], char **argv, int argc)
{ {
register char **ap, *cp, *cp2; char **ap, *cp, *cp2;
char linebuf[LINESIZE], quotec; char linebuf[LINESIZE], quotec;
register char **last; char **last;
ap = argv; ap = argv;
cp = line; cp = line;
@ -1212,8 +1212,8 @@ void DtMail::MailRc::freerawlist(char **argv)
char *DtMail::MailRc::mt_value(char name[]) char *DtMail::MailRc::mt_value(char name[])
{ {
register struct var *vp; struct var *vp;
register char *cp; char *cp;
// extern char *getenv(); // extern char *getenv();
if ((vp = lookup(name, (struct var **)this->variables)) == (struct var *)NULL) if ((vp = lookup(name, (struct var **)this->variables)) == (struct var *)NULL)
@ -1229,8 +1229,8 @@ char *DtMail::MailRc::mt_value(char name[])
*/ */
struct var *DtMail::MailRc::lookup(char *name, struct var **hasharray) struct var *DtMail::MailRc::lookup(char *name, struct var **hasharray)
{ {
register struct var *vp; struct var *vp;
register int h; int h;
h = hash(name); h = hash(name);
for (vp = hasharray[h]; vp != (struct var *)NULL; vp = vp->v_link) for (vp = hasharray[h]; vp != (struct var *)NULL; vp = vp->v_link)
@ -1406,7 +1406,7 @@ DtMail::MailRc::nignorelist(char * key, void * data, void * client_data)
int DtMail::MailRc::set(char **arglist, DtMail::MailRc *) int DtMail::MailRc::set(char **arglist, DtMail::MailRc *)
{ {
register char *cp, *cp2; char *cp, *cp2;
char varbuf[LINESIZE], **ap; char varbuf[LINESIZE], **ap;
int errs; int errs;
@ -1500,7 +1500,7 @@ DtMail::MailRc::wset(const char * verbatim,
int DtMail::MailRc::unset(char **arglist, DtMail::MailRc *) int DtMail::MailRc::unset(char **arglist, DtMail::MailRc *)
{ {
register char **ap; char **ap;
for (ap = arglist; *ap != NOSTR; ap++) for (ap = arglist; *ap != NOSTR; ap++)
(void) MailRc::mt_deassign(*ap); (void) MailRc::mt_deassign(*ap);
@ -1523,8 +1523,8 @@ DtMail::MailRc::wunset(const char * verbatim,
*/ */
int DtMail::MailRc::hash(char *name) int DtMail::MailRc::hash(char *name)
{ {
register unsigned h; unsigned h;
register char *cp; char *cp;
for (cp = name, h = 0; *cp; h = (h << 2) + *cp++) for (cp = name, h = 0; *cp; h = (h << 2) + *cp++)
; ;
@ -1579,8 +1579,8 @@ void DtMail::MailRc::mt_assign(char *name,char * val)
int DtMail::MailRc::mt_deassign(char *s) int DtMail::MailRc::mt_deassign(char *s)
{ {
register struct var *vp, *vp2; struct var *vp, *vp2;
register int h; int h;
if ((vp2 = lookup(s, MailRc::variables)) == (struct var *)NULL) { if ((vp2 = lookup(s, MailRc::variables)) == (struct var *)NULL) {
return (1); return (1);
@ -1607,8 +1607,8 @@ int DtMail::MailRc::mt_deassign(char *s)
*/ */
void DtMail::MailRc::mt_puthash(char *name, char *val, struct var **hasharray) void DtMail::MailRc::mt_puthash(char *name, char *val, struct var **hasharray)
{ {
register struct var *vp; struct var *vp;
register int h; int h;
vp = lookup(name, hasharray); vp = lookup(name, hasharray);
if (vp == (struct var *)NULL) { if (vp == (struct var *)NULL) {
@ -1681,7 +1681,7 @@ void DtMail::MailRc::hm_add(struct hash **table,
int size) int size)
{ {
int index; int index;
register struct hash *h; struct hash *h;
if (!table) if (!table)
return; return;
@ -1703,9 +1703,9 @@ void DtMail::MailRc::hm_add(struct hash **table,
void DtMail::MailRc::hm_delete(struct hash **table, char *key) void DtMail::MailRc::hm_delete(struct hash **table, char *key)
{ {
register int index; int index;
register struct hash *h; struct hash *h;
register struct hash *old; struct hash *old;
if (!table) if (!table)
return; return;
@ -1733,7 +1733,7 @@ void DtMail::MailRc::hm_delete(struct hash **table, char *key)
void *DtMail::MailRc::hm_test(struct hash **table, char *key) void *DtMail::MailRc::hm_test(struct hash **table, char *key)
{ {
register struct hash *h; struct hash *h;
if (!table) if (!table)
return (NULL); return (NULL);
@ -1754,7 +1754,7 @@ void *DtMail::MailRc::hm_test(struct hash **table, char *key)
void DtMail::MailRc::hm_mark(struct hash **table, char *key) void DtMail::MailRc::hm_mark(struct hash **table, char *key)
{ {
register struct hash *h; struct hash *h;
if (!table) if (!table)
return; return;
@ -1773,7 +1773,7 @@ void DtMail::MailRc::hm_mark(struct hash **table, char *key)
int DtMail::MailRc::hm_ismarked(struct hash **table, char *key) int DtMail::MailRc::hm_ismarked(struct hash **table, char *key)
{ {
register struct hash *h; struct hash *h;
if (!table) return 0; if (!table) return 0;
h = table[hash_index(key)]; h = table[hash_index(key)];
@ -1801,9 +1801,9 @@ DtMail::MailRc::hm_scan(struct hash **table, hm_callback callback, void * client
int DtMail::MailRc::hash_index(char *key) int DtMail::MailRc::hash_index(char *key)
{ {
register unsigned h; unsigned h;
register char *s; char *s;
register int c; int c;
s = key; s = key;
h = 0; h = 0;
@ -2004,8 +2004,8 @@ DtMail::MailRc::expand(char *name)
char *xname = new char[LINESIZE]; char *xname = new char[LINESIZE];
char *cmdbuf = new char[LINESIZE]; char *cmdbuf = new char[LINESIZE];
char *str; char *str;
register int pid, l; int pid, l;
register char *cp, *Shell; char *cp, *Shell;
int s, pivec[2]; int s, pivec[2];
struct stat sbuf; struct stat sbuf;
char *retchr = NULL; char *retchr = NULL;
@ -2133,7 +2133,7 @@ DtMail::MailRc::wsource(const char * verbatim, char ** arglist, FILE * outf)
int int
DtMail::MailRc::ifcmd(char **arglist, DtMail::MailRc *self) DtMail::MailRc::ifcmd(char **arglist, DtMail::MailRc *self)
{ {
register char *cp; char *cp;
if (self->cond != CANY) { if (self->cond != CANY) {
fprintf(stderr,"Illegal nested \"if\"\n"); fprintf(stderr,"Illegal nested \"if\"\n");

View file

@ -906,7 +906,7 @@ int get_stat(
struct vmount **vmountpp) /* place to tell where buffer is */ struct vmount **vmountpp) /* place to tell where buffer is */
{ {
size_t size; size_t size;
register struct vmount *vm; struct vmount *vm;
int nmounts; int nmounts;
int count; int count;
@ -958,7 +958,7 @@ struct vmount *get_vmount(fsid_t *fsid)
{ {
struct vmount *inu_vmount_p=NULL; struct vmount *inu_vmount_p=NULL;
int inu_vmount_num; int inu_vmount_num;
register struct vmount *vm; struct vmount *vm;
int nmount; int nmount;
/* make sure we have all the virtual mount status of this host */ /* make sure we have all the virtual mount status of this host */

View file

@ -42,10 +42,10 @@
extern "C" extern "C"
int int
strcasecmp(register const char *s1, strcasecmp(const char *s1,
register const char *s2) const char *s2)
{ {
register int c1, c2; int c1, c2;
while (*s1 && *s2) { while (*s1 && *s2) {
c1 = isupper(*s1) ? tolower(*s1) : *s1; c1 = isupper(*s1) ? tolower(*s1) : *s1;
@ -61,11 +61,11 @@ strcasecmp(register const char *s1,
extern "C" extern "C"
int int
strncasecmp(register const char *s1, strncasecmp(const char *s1,
register const char *s2, const char *s2,
register size_t count) size_t count)
{ {
register int c1, c2; int c1, c2;
if (!count) if (!count)
return 0; return 0;

View file

@ -86,7 +86,7 @@ getNamedValueInt(const char *string, const char *name)
int stringLen = strlen(string); int stringLen = strlen(string);
int nameLen = strlen(name); int nameLen = strlen(name);
int results = 0; int results = 0;
register unsigned int offset; unsigned int offset;
for (offset = 0; offset < stringLen - nameLen; offset++) { for (offset = 0; offset < stringLen - nameLen; offset++) {
if (strncasecmp(&string[offset], name, nameLen) == 0) { if (strncasecmp(&string[offset], name, nameLen) == 0) {
@ -110,7 +110,7 @@ getNamedValueString(const char *string, const char *name)
int nameLen = strlen(name); int nameLen = strlen(name);
const char * results; const char * results;
char * stringEnd; char * stringEnd;
register unsigned int offset; unsigned int offset;
for (offset = 0; offset < stringLen - nameLen; offset++) { for (offset = 0; offset < stringLen - nameLen; offset++) {
if (strncasecmp(&string[offset], name, nameLen) == 0) { if (strncasecmp(&string[offset], name, nameLen) == 0) {
@ -191,7 +191,7 @@ RFCMessage *
RFCMailBox::_assemblePartial(DtMailEnv & error, RFCMailBox::_assemblePartial(DtMailEnv & error,
RFCMessage * message) RFCMessage * message)
{ {
register unsigned int offset; unsigned int offset;
unsigned int totalParts = 0; unsigned int totalParts = 0;
RFCMessage * msg = message; RFCMessage * msg = message;
@ -319,7 +319,7 @@ RFCMailBox::_assemblePartial(DtMailEnv & error,
unsigned int duplicateCount; unsigned int duplicateCount;
int fromLen; int fromLen;
int headerNumber = 0; int headerNumber = 0;
register unsigned int dupOffset; unsigned int dupOffset;
if (error.isNotSet()) { if (error.isNotSet()) {
// //

View file

@ -524,8 +524,8 @@ skin_comma(char * buf)
void void
RFCTransport::arpaPhrase(const char * name, DtMailAddressSeq & tokens) RFCTransport::arpaPhrase(const char * name, DtMailAddressSeq & tokens)
{ {
register char c; char c;
register const char *cp; const char *cp;
char *cp2; char *cp2;
char *nbufp; char *nbufp;
char *bufend; char *bufend;