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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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