home *** CD-ROM | disk | FTP | other *** search
- /************************************************************
-
- Index.c
-
- Preditor 3.0 extension.
-
- Create a new alphabetical index for using as an address
- book, phone book, recipies, etc.
-
- © Copyright Evatac Software 1988-1995
- All rights reserved
-
- ************************************************************/
-
- #include "PreditorExtension.h"
-
- #include <SetupA4.h>
- #ifndef THINKC
- #include <A4Stuff.h>
- #else
- #define SetCurrentA4() 0; RememberA4()
- #define SetA4(x) SetUpA4()
- #endif
-
- #ifdef powerc
- ProcInfoType __procinfo = ExtensionUPPInfo;
- #endif
-
- void main(
- ExternalCallbackBlock *callbacks,
- WindowRef window
- )
- {
- long saved_a4;
- unsigned char name[10], ch;
-
- saved_a4 = SetCurrentA4();
-
- extNewDocument(callbacks, kIndexDouble);
-
- name[0] = 1;
-
- for (ch = 'A'; ch <= 'Z'; ch++) {
-
- name[1] = ch;
-
- extIndexEntry(callbacks, name, false, kAddEntry);
- }
-
- SetA4(saved_a4);
- }
-