Changeset 26


Ignore:
Timestamp:
Nov 23, 2000 9:44:21 PM (14 years ago)
Author:
msbethke
Message:

Marked local functions

Location:
trunk/yamos
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yamos/YAM_MA.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r3 r26  
    2626#include "YAM_rexx.h" 
    2727 
     28/* local protos */ 
     29LOCAL ULONG MA_GetSortType(int); 
     30LOCAL struct Mail **MA_CreateFullList(struct Folder*); 
     31LOCAL struct Mail *MA_MoveCopySingle(struct Mail*, int, struct Folder*, struct Folder*, BOOL); 
     32LOCAL void MA_UpdateStatus(void); 
     33LOCAL char *AppendRcpt(char*, struct Person*, BOOL); 
     34LOCAL int MA_CmpDate(struct Mail**, struct Mail**); 
     35LOCAL void MA_InsertIntroText(FILE*, char*, struct ExpandTextData*); 
     36LOCAL void MA_EditorNotification(int); 
     37LOCAL void MA_SetupQuoteString(struct WR_ClassData*, struct ExpandTextData*, struct Mail*); 
     38LOCAL int MA_CheckWriteWindow(int); 
     39LOCAL struct Person *MA_GetAddressSelect(struct Mail*); 
     40LOCAL char *MA_GetRealSubject(char*); 
     41LOCAL int MA_MailCompare(struct Mail*, struct Mail*, int); 
     42 
    2843/*************************************************************************** 
    2944 Module: Main 
     
    3348/// MA_GetSortType 
    3449//  Calculates value for sort indicator 
    35 ULONG MA_GetSortType(int sort) 
     50LOCAL ULONG MA_GetSortType(int sort) 
    3651{ 
    3752   ULONG sort2col[8] = { 0,4,6,1,1,3,5,0 }; 
     
    3954   else return sort2col[abs(sort)] | MUIV_NList_SortTypeAdd_2Values; 
    4055} 
     56 
    4157/// 
    4258/// MA_SetSortFlag 
     
    4864   set(G->MA->GUI.NL_MAILS, MUIA_NList_SortType2, MA_GetSortType(fo->Sort[1])); 
    4965} 
     66 
    5067/// 
    5168/// MA_ChangeTransfer 
     
    5774   DoMethod(G->App, MUIM_MultiSet, MUIA_Menuitem_Enabled, on, gui->MI_IMPORT, gui->MI_EXPORT, gui->MI_SENDALL, gui->MI_EXCHANGE, gui->MI_GETMAIL, gui->MI_CSINGLE, NULL); 
    5875} 
     76 
    5977/// 
    6078/// MA_ChangeSelectedFunc 
     
    91109} 
    92110MakeHook(MA_ChangeSelectedHook, MA_ChangeSelectedFunc); 
     111 
    93112/// 
    94113/// MA_SetMessageInfoFunc 
     
    103122} 
    104123MakeHook(MA_SetMessageInfoHook, MA_SetMessageInfoFunc); 
     124 
    105125/// 
    106126/// MA_SetFolderInfoFunc 
     
    115135} 
    116136MakeHook(MA_SetFolderInfoHook, MA_SetFolderInfoFunc); 
     137 
    117138/// 
    118139/// MA_GetActiveMail 
     
    132153   return mail; 
    133154} 
     155 
    134156/// 
    135157/// MA_SetMailStatus 
     
    153175   else SetComment(GetMailFile(NULL, NULL, mail), statstr); 
    154176} 
     177 
    155178/// 
    156179/// MA_CreateFullList 
    157180//  Builds a list containing all messages in a folder 
    158 struct Mail **MA_CreateFullList(struct Folder *fo) 
     181LOCAL struct Mail **MA_CreateFullList(struct Folder *fo) 
    159182{ 
    160183   int selected = fo->Total; 
     
    170193   return mlist; 
    171194} 
     195 
    172196/// 
    173197/// MA_CreateMarkedList 
     
    208232   return mlist; 
    209233} 
     234 
    210235/// 
    211236/// MA_DeleteSingle 
     
    223248   else MA_MoveCopy(mail, mail->Folder, FO_GetFolderByType(FT_DELETED, NULL), FALSE); 
    224249} 
     250 
    225251/// 
    226252/// MA_MoveCopySingle 
    227253//  Moves or copies a single message from one folder to another 
    228 struct Mail *MA_MoveCopySingle(struct Mail *mail, int pos, struct Folder *from, struct Folder *to, BOOL copyit) 
     254LOCAL struct Mail *MA_MoveCopySingle(struct Mail *mail, int pos, struct Folder *from, struct Folder *to, BOOL copyit) 
    229255{ 
    230256   struct Mail cmail = *mail; 
     
    251277   return NULL; 
    252278} 
     279 
    253280/// 
    254281/// MA_MoveCopy 
     
    291318   MA_ChangeSelectedFunc(); 
    292319} 
     320 
    293321/// 
    294322/// MA_UpdateStatus 
    295323//  Changes status of all new messages to unread 
    296 void MA_UpdateStatus(void) 
     324LOCAL void MA_UpdateStatus(void) 
    297325{ 
    298326   int i; 
     
    340368} 
    341369MakeHook(MA_ReadMessageHook, MA_ReadMessage); 
     370 
    342371/// 
    343372/// AppendRcpt 
    344373//  Appends a recipient address to a string 
    345 char *AppendRcpt(char *sbuf, struct Person *pe, BOOL excludeme) 
     374LOCAL char *AppendRcpt(char *sbuf, struct Person *pe, BOOL excludeme) 
    346375{ 
    347376   char *ins; 
     
    360389   return StrBufCat(sbuf, ins); 
    361390} 
     391 
    362392/// 
    363393/// MA_CmpDate 
    364394//  Compares two messages by date 
    365 int MA_CmpDate(struct Mail **pentry1, struct Mail **pentry2) 
     395LOCAL int MA_CmpDate(struct Mail **pentry1, struct Mail **pentry2) 
    366396{ 
    367397   return CompareDates(&(pentry2[0]->Date), &(pentry1[0]->Date)); 
    368398} 
     399 
    369400/// 
    370401/// MA_InsertIntroText 
    371402//  Inserts a phrase into the message text 
    372 void MA_InsertIntroText(FILE *fh, char *text, struct ExpandTextData *etd) 
     403LOCAL void MA_InsertIntroText(FILE *fh, char *text, struct ExpandTextData *etd) 
    373404{ 
    374405   if (*text) 
     
    380411   } 
    381412} 
     413 
    382414/// 
    383415/// MA_EditorNotification 
    384416//  Starts file notification for temporary message file 
    385 void MA_EditorNotification(int winnum) 
     417LOCAL void MA_EditorNotification(int winnum) 
    386418{ 
    387419   FileToEditor(G->WR_Filename[winnum], G->WR[winnum]->GUI.TE_EDIT); 
     
    389421   set(G->WR[winnum]->GUI.TE_EDIT, MUIA_TextEditor_HasChanged, FALSE); 
    390422} 
     423 
    391424/// 
    392425/// MA_SetupQuoteString 
    393426//  Creates quote string by replacing variables with values 
    394 void MA_SetupQuoteString(struct WR_ClassData *wr, struct ExpandTextData *etd, struct Mail *mail) 
     427LOCAL void MA_SetupQuoteString(struct WR_ClassData *wr, struct ExpandTextData *etd, struct Mail *mail) 
    395428{ 
    396429   struct ExpandTextData l_etd; 
     
    407440   FreeStrBuf(sbuf); 
    408441} 
     442 
    409443/// 
    410444/// MA_CheckWriteWindow 
    411445//  Opens a write window 
    412 int MA_CheckWriteWindow(int winnum) 
     446LOCAL int MA_CheckWriteWindow(int winnum) 
    413447{ 
    414448   if (SafeOpenWindow(G->WR[winnum]->GUI.WI)) return winnum; 
     
    417451   return -1; 
    418452} 
     453 
    419454/// 
    420455/// MA_NewNew 
     
    451486   return winnum; 
    452487} 
     488 
    453489/// 
    454490/// MA_NewEdit 
     
    522558   return winnum; 
    523559} 
     560 
    524561/// 
    525562/// MA_NewBounce 
     
    542579   return winnum; 
    543580} 
     581 
    544582/// 
    545583/// MA_NewForward 
     
    609647   return winnum; 
    610648} 
     649 
    611650/// 
    612651/// MA_NewReply 
     
    744783   return winnum; 
    745784} 
     785 
    746786/// 
    747787/// MA_RemoveAttach 
     
    789829   RE_FreePrivateRC(); 
    790830} 
     831 
    791832/// 
    792833/// MA_RemoveAttachFunc 
     
    813854} 
    814855MakeHook(MA_RemoveAttachHook, MA_RemoveAttachFunc); 
     856 
    815857/// 
    816858/// MA_SaveAttachFunc 
     
    841883} 
    842884MakeHook(MA_SaveAttachHook, MA_SaveAttachFunc); 
     885 
    843886/// 
    844887/// MA_SavePrintFunc 
     
    876919} 
    877920MakeHook(MA_SavePrintHook, MA_SavePrintFunc); 
     921 
    878922/// 
    879923/// MA_NewMessage 
     
    899943   return winnr; 
    900944} 
     945 
    901946SAVEDS ASM void MA_NewMessageFunc(REG(a1) int *arg) 
    902947{ 
     
    912957} 
    913958MakeHook(MA_NewMessageHook, MA_NewMessageFunc); 
     959 
    914960/// 
    915961/// MA_DeleteMessage 
     
    9631009   MA_ChangeSelectedFunc(); 
    9641010} 
     1011 
    9651012SAVEDS ASM void MA_DeleteMessageFunc(REG(a1) int *arg) 
    9661013{ 
     
    9701017} 
    9711018MakeHook(MA_DeleteMessageHook, MA_DeleteMessageFunc); 
     1019 
    9721020/// 
    9731021/// MA_DelKey 
     
    9821030} 
    9831031MakeHook(MA_DelKeyHook, MA_DelKeyFunc); 
     1032 
    9841033/// 
    9851034/// MA_GetAddressSelect 
    9861035//  Asks user which address (from/replyto) to store 
    987 struct Person *MA_GetAddressSelect(struct Mail *mail) 
     1036LOCAL struct Person *MA_GetAddressSelect(struct Mail *mail) 
    9881037{ 
    9891038   struct Person *pe = GetReturnAddress(mail); 
     
    10011050   return pe; 
    10021051} 
     1052 
    10031053/// 
    10041054/// MA_GetAddress 
     
    10641114   } 
    10651115} 
     1116 
    10661117/// 
    10671118/// MA_GetAddressFunc 
     
    10771128} 
    10781129MakeHook(MA_GetAddressHook, MA_GetAddressFunc); 
     1130 
    10791131/// 
    10801132/// MA_PopNow 
     
    10871139   TR_GetMailFromNextPOP(TRUE, pop, mode); 
    10881140} 
     1141 
    10891142SAVEDS ASM void MA_PopNowFunc(REG(a1) int *arg) 
    10901143{ 
     
    11231176   return scnt; 
    11241177} 
     1178 
    11251179/// 
    11261180/// MA_FreeRules 
     
    11351189   } 
    11361190} 
     1191 
    11371192/// 
    11381193/// MA_ExecuteRuleAction 
     
    11921247   return TRUE; 
    11931248} 
     1249 
    11941250/// 
    11951251/// MA_ApplyRulesFunc 
     
    12521308} 
    12531309MakeHook(MA_ApplyRulesHook, MA_ApplyRulesFunc); 
     1310 
    12541311/// 
    12551312/// MA_SendMList 
     
    12721329   return success; 
    12731330} 
     1331 
    12741332/// 
    12751333/// MA_Send 
     
    12921350   return success; 
    12931351} 
     1352 
    12941353SAVEDS ASM void MA_SendFunc(REG(a1) int *arg) 
    12951354{ 
     
    13171376   } 
    13181377} 
     1378 
    13191379SAVEDS ASM void MA_SetStatusToFunc(REG(a1) int *arg) 
    13201380{ 
     
    13221382} 
    13231383MakeHook(MA_SetStatusToHook, MA_SetStatusToFunc); 
     1384 
    13241385/// 
    13251386/// MA_SelectAllFunc 
     
    13301391} 
    13311392MakeHook(MA_SelectAllHook, MA_SelectAllFunc); 
     1393 
    13321394/// 
    13331395/// MA_DeleteOldFunc 
     
    13591421} 
    13601422MakeHook(MA_DeleteOldHook, MA_DeleteOldFunc); 
     1423 
    13611424/// 
    13621425/// MA_DeleteDeletedFunc 
     
    13831446}             
    13841447MakeHook(MA_DeleteDeletedHook, MA_DeleteDeletedFunc); 
     1448 
    13851449/// 
    13861450/// MA_RescanIndexFunc 
     
    13951459} 
    13961460MakeHook(MA_RescanIndexHook, MA_RescanIndexFunc); 
     1461 
    13971462/// 
    13981463/// MA_ExportMessages 
     
    14291494   return success; 
    14301495} 
     1496 
    14311497SAVEDS ASM void MA_ExportMessagesFunc(REG(a1) int *arg) 
    14321498{ 
     
    14341500} 
    14351501MakeHook(MA_ExportMessagesHook, MA_ExportMessagesFunc); 
     1502 
    14361503/// 
    14371504/// MA_ImportMessages 
     
    14601527   return FALSE; 
    14611528} 
     1529 
    14621530SAVEDS void MA_ImportMessagesFunc(void) 
    14631531{ 
     
    14701538} 
    14711539MakeHook(MA_ImportMessagesHook, MA_ImportMessagesFunc); 
     1540 
    14721541/// 
    14731542/// MA_MoveMessageFunc 
     
    14801549} 
    14811550MakeHook(MA_MoveMessageHook, MA_MoveMessageFunc); 
     1551 
    14821552/// 
    14831553/// MA_CopyMessageFunc 
     
    14901560} 
    14911561MakeHook(MA_CopyMessageHook, MA_CopyMessageFunc); 
     1562 
    14921563/// 
    14931564/// MA_ChangeSubject 
     
    15371608   FinishUnpack(fullfile); 
    15381609} 
     1610 
    15391611/// 
    15401612/// MA_ChangeSubjectFunc 
     
    15691641} 
    15701642MakeHook(MA_ChangeSubjectHook, MA_ChangeSubjectFunc); 
     1643 
    15711644/// 
    15721645/// MA_AboutMUIFunc 
     
    15831656} 
    15841657MakeHook(MA_AboutMUIHook, MA_AboutMUIFunc); 
     1658 
    15851659/// 
    15861660/// MA_CheckVersionFunc 
     
    16191693} 
    16201694MakeHook(MA_CheckVersionHook, MA_CheckVersionFunc); 
     1695 
    16211696/// 
    16221697/// MA_ShowErrorsFunc 
     
    16271702} 
    16281703MakeHook(MA_ShowErrorsHook, MA_ShowErrorsFunc); 
     1704 
    16291705/// 
    16301706/// MA_StartMacro 
     
    16921768   return TRUE; 
    16931769} 
     1770 
    16941771/// 
    16951772/// MA_CallRexxFunc 
     
    17241801} 
    17251802MakeHook(PO_WindowHook, PO_Window); 
     1803 
    17261804/// 
    17271805/// MA_LV_FConFunc 
     
    17341812} 
    17351813MakeHook(MA_LV_FConHook, MA_LV_FConFunc); 
     1814 
    17361815/// 
    17371816/// MA_LV_DspFunc 
     
    17881867} 
    17891868MakeHook(MA_LV_DspFuncHook,MA_LV_DspFunc); 
     1869 
    17901870/// 
    17911871/// MA_GetRealSubject 
    17921872//  Strips reply prefix / mailing list name from subject 
    1793 char *MA_GetRealSubject(char *sub) 
     1873LOCAL char *MA_GetRealSubject(char *sub) 
    17941874{ 
    17951875   char *p, *pend = &sub[strlen(sub)]; 
     
    18001880   return sub; 
    18011881} 
     1882 
    18021883/// 
    18031884/// MA_MailCompare 
    18041885//  Compares two messages 
    1805 int MA_MailCompare(struct Mail *entry1, struct Mail *entry2, int column) 
     1886LOCAL int MA_MailCompare(struct Mail *entry1, struct Mail *entry2, int column) 
    18061887{ 
    18071888   static int values[9] = { 50, 35, 30, 25, 45, 60, 40, 20, 55 }; 
     
    18251906   return 0; 
    18261907} 
     1908 
    18271909/// 
    18281910/// MA_LV_Cmp2Func 
     
    18451927} 
    18461928MakeHook(MA_LV_Cmp2Hook, MA_LV_Cmp2Func); 
     1929 
    18471930/// 
    18481931/// MA_LV_FCmp2Func 
     
    19041987   DoMethod(G->MA->GUI.MN_FOLDER, MUIM_Family_AddTail, G->MA->GUI.MI_CSINGLE); 
    19051988} 
     1989 
    19061990/// 
    19071991/// MA_MakeMAFormat 
     
    19232007   set(lv, MUIA_NList_Format, format); 
    19242008} 
     2009 
    19252010/// 
    19262011/// MA_New 
  • trunk/yamos/YAM_MAf.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r3 r26  
    2525#include "YAM.h" 
    2626#include "YAM_rexx.h" 
     27 
     28/* local protos */ 
     29LOCAL void MA_ValidateStatus(struct Folder*); 
     30LOCAL char *MA_IndexFileName(struct Folder*); 
     31LOCAL BOOL MA_DetectUUE(FILE*); 
     32LOCAL void MA_GetRecipients(char*, struct Person**, int*); 
    2733 
    2834/*************************************************************************** 
     
    4854   return TRUE; 
    4955} 
     56 
    5057/// 
    5158/// MA_ValidateStatus 
    5259//  Avoids invalid status values 
    53 void MA_ValidateStatus(struct Folder *folder) 
     60LOCAL void MA_ValidateStatus(struct Folder *folder) 
    5461{ 
    5562   struct Mail *mail; 
     
    6168         else if (C->UpdateNewMail) MA_SetMailStatus(mail, STATUS_UNR); 
    6269} 
     70 
    6371/// 
    6472/// MA_IndexFileName 
    6573//  Returns file name of folder index 
    66 char *MA_IndexFileName(struct Folder *folder) 
     74LOCAL char *MA_IndexFileName(struct Folder *folder) 
    6775{ 
    6876   static char buffer[SIZE_PATHFILE]; 
     
    7179   return buffer; 
    7280} 
     81 
    7382/// 
    7483/// MA_LoadIndex 
     
    126135   return indexloaded; 
    127136} 
     137 
    128138/// 
    129139/// MA_SaveIndex 
     
    167177   return TRUE; 
    168178} 
     179 
    169180/// 
    170181/// MA_GetIndex 
     
    188199   return TRUE; 
    189200} 
     201 
    190202/// 
    191203/// MA_ExpireIndex 
     
    196208   folder->Flags |= FOFL_MODIFY; 
    197209} 
     210 
    198211/// 
    199212/// MA_UpdateIndexes 
     
    224237   } 
    225238} 
     239 
    226240/// 
    227241/// MA_FlushIndexes 
     
    249263   } 
    250264} 
     265 
    251266SAVEDS void MA_FlushIndexFunc(void) 
    252267{ 
     
    293308   } 
    294309} 
     310 
    295311SAVEDS void MA_ChangeFolderFunc(void) 
    296312{ 
     
    324340   return buffer; 
    325341} 
     342 
    326343/// 
    327344/// MA_DetectUUE 
    328345//  Checks if message contains an uuencoded file 
    329 BOOL MA_DetectUUE(FILE *fh) 
     346LOCAL BOOL MA_DetectUUE(FILE *fh) 
    330347{ 
    331348   char *buffer; 
     
    339356   return found; 
    340357} 
     358 
    341359/// 
    342360/// MA_ReadHeader 
     
    371389   return success; 
    372390 
     391 
    373392/// 
    374393/// MA_FreeEMailStruct 
     
    383402   clear(email, sizeof(struct ExtendedMail)); 
    384403} 
     404 
    385405/// 
    386406/// MA_GetRecipients 
    387407//  Extracts recipients from a header field 
    388 void MA_GetRecipients(char *h, struct Person **per, int *percnt) 
     408LOCAL void MA_GetRecipients(char *h, struct Person **per, int *percnt) 
    389409{ 
    390410   int cnt; 
     
    407427   } 
    408428} 
     429 
    409430/// 
    410431/// MA_ExamineMail 
     
    577598   return NULL; 
    578599} 
     600 
    579601/// 
    580602/// MA_ScanMailBox 
     
    638660} 
    639661MakeHook(PO_InitFolderListHook, PO_InitFolderList); 
     662 
    640663/// 
    641664/// MA_LV_FDspFunc 
     
    676699} 
    677700MakeHook(MA_LV_FDspFuncHook,MA_LV_FDspFunc); 
     701 
    678702/// 
    679703/// MA_MakeFOFormat 
  • trunk/yamos/YAM_US.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r3 r26  
    2525#include "YAM.h" 
    2626 
     27/* local protos */ 
     28LOCAL void US_SaveUsers(void); 
     29LOCAL void US_LoadUsers(void); 
     30LOCAL BOOL US_PromptForPassword(struct User*, APTR); 
     31LOCAL BOOL US_SaveUserList(void); 
     32LOCAL struct US_ClassData *US_New(BOOL); 
     33 
    2734/*************************************************************************** 
    2835 Module: User list 
     
    3845   return u; 
    3946} 
     47 
    4048/// 
    4149/// US_SaveUsers 
    4250//  Saves user database to .users 
    43 void US_SaveUsers(void) 
     51LOCAL void US_SaveUsers(void) 
    4452{ 
    4553   FILE *fh; 
     
    6371   else ER_NewError(GetStr(MSG_ER_CantCreateFile), fname, NULL); 
    6472} 
     73 
    6574/// 
    6675/// US_LoadUsers 
    6776//  Loads user database from .users 
    68 void US_LoadUsers(void) 
     77LOCAL void US_LoadUsers(void) 
    6978{ 
    7079   BOOL save = FALSE; 
     
    123132   if (save) US_SaveUsers(); 
    124133} 
     134 
    125135/// 
    126136/// US_PromptForPassword 
    127137//  User login: asks for user password 
    128 BOOL US_PromptForPassword(struct User *u, APTR win) 
     138LOCAL BOOL US_PromptForPassword(struct User *u, APTR win) 
    129139{ 
    130140   char passwd[SIZE_PASSWORD]; 
     
    136146   return TRUE; 
    137147} 
     148 
    138149/// 
    139150/// US_Login 
     
    202213   return loggedin; 
    203214} 
     215 
    204216/// 
    205217/// US_DelFunc 
     
    220232} 
    221233MakeHook(US_DelHook, US_DelFunc); 
     234 
    222235/// 
    223236/// US_AddFunc 
     
    239252} 
    240253MakeHook(US_AddHook, US_AddFunc); 
     254 
    241255/// 
    242256/// US_SaveUserList 
    243257//  Initializes configuration files for new users and saves the user database 
    244 BOOL US_SaveUserList(void) 
     258LOCAL BOOL US_SaveUserList(void) 
    245259{ 
    246260   int i; 
     
    280294   return TRUE; 
    281295} 
     296 
    282297/// 
    283298/// US_OpenFunc 
     
    298313} 
    299314MakeHook(US_OpenHook, US_OpenFunc); 
     315 
    300316/// 
    301317/// US_CloseFunc 
     
    306322} 
    307323MakeHook(US_CloseHook, US_CloseFunc); 
     324 
    308325/// 
    309326/// US_GetUSEntryFunc 
     
    342359} 
    343360MakeHook(US_GetUSEntryHook,US_GetUSEntryFunc); 
     361 
    344362/// 
    345363/// US_PutUSEntryFunc 
     
    376394} 
    377395MakeHook(US_LV_ConHook, US_LV_ConFunc); 
     396 
    378397/// 
    379398/// US_LV_DspFunc 
     
    395414} 
    396415MakeHook(US_LV_DspHook,US_LV_DspFunc); 
     416 
    397417/// 
    398418/// US_New 
    399419//  Creates user list window 
    400 struct US_ClassData *US_New(BOOL supervisor) 
     420LOCAL struct US_ClassData *US_New(BOOL supervisor) 
    401421{ 
    402422   struct US_ClassData *data; 
Note: See TracChangeset for help on using the changeset viewer.